Div, Mod and variables
Div, Mod and variables
(OP)
Why dont DIV and MOD let you use variables? Im trying to do <real variable> DIV <constant number> but it says operand error.
Its just silly if you ask me! hehe.
Its just silly if you ask me! hehe.
~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."
RE: Div, Mod and variables
A div B = C
A mod B = D
A = B * C + D
Regards,
Bert Vingerhoets
vingerhoetsbert@hotmail.com
http://student.vub.ac.be/~bvingerh/
Don't worry what people think about you. They're too busy wondering what you think about them.
RE: Div, Mod and variables
If you want to get the remainder from a division of a real (or any other floating point) number is to move it into an integer first. Use the round/trunc etc. to get the right integer. If you want the effect of div, just divide with /, and then truncate.
Best wishes!
RE: Div, Mod and variables
~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."
RE: Div, Mod and variables
RE: Div, Mod and variables
~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."