To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 2942
    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 (...) (25 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 (...) (25 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 -= (...) (25 years ago, 19-Jan-99, to lugnet.robotics)
 

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR