| | nqc macros
|
| hi i'm a nqc newbie trying to figure out tasks, subroutines etc. i have a program with (say) 5 macros to move the robot around. I want the robot to constantly shuffle around these macros in a random way. i figured out how to do it with 2, using a (...) (20 years ago, 21-Sep-04, to lugnet.robotics)
| | | | Re: nqc macros
|
| (...) You could use a lot of nested "if", but the best solution is to use the "switch" statement (excerpt from NQC help file): switch(x) { case 1: // do something when x is 1 break; case 2: case 3: // do something else when x is 2 or 3 break; (...) (20 years ago, 21-Sep-04, to lugnet.robotics)
| |