Programming instructions
Reference
Project Lead The Way
©
and Carnegie Mellon Robotics Academy
©
/ For use with VEX
®
Robotics Systems
Error Messages in ROBOTC Code • 5
Common Warning Messages
Warning messages are used to notify you about possible programming and logic errors in
your program. With warning messages, the compiler is able to x or ignore the issues so
they will not prevent your program from compiling or downloading to your robot.
A common occurrence of warning messages are empty, innite loops in your code. In the
example below, the an innite loop is created, with no code embedded within the loop to stop
it from repeating forever. This is considered a warning, rather than an error, because it is
valid code and can be intentionally used by a programmer.
The warning message will inform you that there was a possible programming error caused
by an innite loop: “*Warning*:Possible programming error. Innite loop (unconditional
branch to itself) detected.”
Error Messages in ROBOTC Code
If creating an innite loop was your intention, you do not need to correct this message. If it was not
intentional, you can:
1. Include code within the curly braces of the while loop, for it to repeat.
2. Change the condition of the while loop, so that it does not repeat forever.
Go to Reference Links