math operator %
Peter Verkaik
Posts: 3,956
Hi,
I was trying out some math operators with word variables.
+ (add), - (sub), * (mul), / (div), | (or), ^ (xor), & (and) all compile correctly.
The % (mod) opens a dos window with a listing up to the statement where % is used.
ramX var word
ramY var word
result var word
ramX = result % ramY
gives this strange behaviour.
Either the % is not working or it not the mod function.
Any comment on this?
Edit: just noticed that // is the mod operator.
Then what does the % do, it gives a listing but not an error message.
regards peter
Post Edited (Peter Verkaik) : 8/19/2006 10:54:08 AM GMT
I was trying out some math operators with word variables.
+ (add), - (sub), * (mul), / (div), | (or), ^ (xor), & (and) all compile correctly.
The % (mod) opens a dos window with a listing up to the statement where % is used.
ramX var word
ramY var word
result var word
ramX = result % ramY
gives this strange behaviour.
Either the % is not working or it not the mod function.
Any comment on this?
Edit: just noticed that // is the mod operator.
Then what does the % do, it gives a listing but not an error message.
regards peter
Post Edited (Peter Verkaik) : 8/19/2006 10:54:08 AM GMT
Comments
Looks like you found a bug. It's causing the compiler to hang. I'll look into fixing it.
The % is used to prefix a binary value. That is what is confusing the compiler.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
"You're braver than you believe, stronger than you seem, and smarter than you think" Christopher Robin to Pooh
Post Edited (Bean (Hitt Consulting)) : 8/19/2006 11:34:25 AM GMT