Vex CORTEX Manuál s instrukcemi Strana 97

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 166
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 96
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, innite loops in your code. In the
example below, the an innite 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 innite loop: “*Warning*:Possible programming error. Innite loop (unconditional
branch to itself) detected.”
Error Messages in ROBOTC Code
If creating an innite 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
Zobrazit stránku 96
1 2 ... 92 93 94 95 96 97 98 99 100 101 102 ... 165 166

Komentáře k této Příručce

Žádné komentáře