| | Re: Expression limitations w/bytecode Dave Baum
| | | (...) The firmware does support basic arithmetic operations. You can use them in NQC like this... int a, b; task main { a = IN_1; b = IN_1; b -= a; } Dave p.s. As a side note, NQC does not support stuff like "a=b+c", but this is due to concurrency (...) (26 years ago, 19-Jan-99, to lugnet.robotics)
| | | | | | | | Re: Expression limitations w/bytecode Matthew D. Stock
| | | | | Dave Baum writes: > The firmware does support basic arithmetic operations. You can use them > in NQC like this... Ah, my mistake. I had tried something like "if (a - b > 20)" using NQC, and it failed. I referred to the docs, and my read of the (...) (26 years ago, 19-Jan-99, to lugnet.robotics)
| | | | | | | | | | | | Re: Expression limitations w/bytecode Dave Baum
| | | | | One more note on arithmetic... The firmware supports operations where the second operand is either a constant or a variable, but not other sources (such as input values, timers, etc). Present versions of NQC don't check this, so code like "a -= (...) (26 years ago, 19-Jan-99, to lugnet.robotics)
| | | | | | |