Vex CORTEX Bedienerhandbuch Seite 95

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 166
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 94
Reference
Project Lead The Way
©
and Carnegie Mellon Robotics Academy
©
/ For use with VEX
®
Robotics Systems
Error Messages in ROBOTC Code 3
Common Error Messages
The example below contains two syntax errors: a missing curly brace on line 2 and a missing
semicolon on line 6. Once again, you should try to correct the rst error in the program before
moving on.
The rst error message comes up on line 4, saying “**Error**:Expected->’{‘. Found ‘int’”. When the
word “Expected->” appears in the Errors display screen, it usually indicates that a piece of syntax
is missing. In this case, it expected to nd the missing curly brace immediately after task main(),
but found the reserved word int instead. To correct this error, you should add the opening curly
brace on line 2 and then recompile your code.
After recompiling your code, any remaining errors will be displayed. Missing semicolons also
display an “Expected->” style error message, but notice that the error for the missing semicolon on
line 6 appears on line 7. This is because the compiler ignores whitespace (blank lines, spaces and
tabs), but expected a semicolon before it encountered the wait command. To correct this error, you
should add a semicolon after the forward command.
Error Messages in ROBOTC Code
Go to Reference Links
Seitenansicht 94
1 2 ... 90 91 92 93 94 95 96 97 98 99 100 ... 165 166

Kommentare zu diesen Handbüchern

Keine Kommentare