ID:269304   May 17 2005, 9:39 am ```for(var/a=1 to 12) if(a%6==0) //I had to do that or no workie :( world<<"Hi there." ``` if I do: if(!a%6), it doesn't come out true. :( If I do: if(a%6==0), it comes out true. What's going on?
 May 17 2005, 9:56 am Hell Ramen wrote: if I do: if(!a%6), it doesn't come out true. :( If I do: if(a%6==0), it comes out true. What's going on? It's an order of operations issue: the ! operator has a higher precedence than the % operator, meaning that in if(!a % 6), it evaluates if((!a) % 6). Checking for if(!(a % 6)) would work the way you want it to. =) ```if(!(a % 6)) //worksif(!a % 6) //works differently than you may expect because of OO (Order of Operations) ```
 May 17 2005, 9:58 am In response to Wizkidd0123 Oohhh, thanks Wizzie. :d I'm good at math with paranthesis, but not DM stuff like that. :p
 May 17 2005, 10:04 am In response to Hell Ramen Tsk tsk...and that's pretty basic math too. Absolute Zer0
 May 17 2005, 3:16 pm In response to Absolute Zer0 Absolute Zer0 wrote: Tsk tsk...and that's pretty basic math too. Absolute Zer0 That's why I'm good at it. :p