Difference between revisions of "Set"

37 bytes added ,  13:46, 8 May 2006
m
no edit summary
imported>JOG
m
imported>JOG
m
Line 27: Line 27:
'''Notes:'''
'''Notes:'''


*The modulos operator "%" is evaluated after multiplication/division but before addition/subtraction: 4*3%2=0 but 4*(3%2)=4
*The modulos operator "%" is evaluated after multiplication/division but before addition/subtraction
4 * 3 % 2 = 0
4 * (3%2) = 4
1 + 2 % 3 = 3
(1+2) % 3 = 0


*A minus right in front of a number or variable acts as "negative"-sign. When you want to do a subtraction, you need at least one space before and behind the minus. This is the only place where you really need a space between arithmetic operators. (For instance: "a-b" will not compile; it needs to be "a - b")
*A minus right in front of a number or variable acts as "negative"-sign. When you want to do a subtraction, you need at least one space before and behind the minus. This is the only place where you really need a space between arithmetic operators. (For instance: "a-b" will not compile; it needs to be "a - b")
Anonymous user