Does ROBOTC have an and statement?

  1. 2 weeks ago

    Hello Vex Forum,
    My team and I have been having coding problems with our robot and we are testing around. We are getting close to something, but it involves the and statement used in python Ex. if(x = 1 and y = 2).
    Right now our current line of code is
    else if (SensorValue[dgtl8] == 1 && SensorValue[dgtl1] == 1).
    We are trying to find out if there is an and statement, if you know please help.

    6722C Team

  2.'re already using an and operator, though? It's &&. It's right there in your else if's conditional.

  3. trontech569

    Dec 5 CA, USA

    The double ampersands ( or &&) is what I have always used in RobotC for an and statement.


or Sign Up to reply!