Cortex VEXnet Manuál s instrukcemi Strana 87

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 95
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 86
RO BOTC
Reference
Reserved Words 6
©
Carnegie Mellon Robotics Academy / For use with VEX
®
Robotics Systems
Reserved Words
int x; //Declares the integer variable x
x = 765; //Stores 765 inside of x
Data Types
Different types of information require different types of variables to hold them.
int
This data type is used to store integer values ranging from -32768 to 32768.
The code above can also be written:
int x = 765; //Declares the integer variable x and...
//...initializes it to a value of 765
bool x; //Declares the bool variable x
x = 0; //Sets x to 0
bool
This data type is used to store boolean values of either 1 (also true) or 0 (also false).
char x; //Declares the char variable x
x = ‘J‘; //Stores the character J inside of x
char
This data type is used to store a single ASCII character, specied between a set of single quotes.
Zobrazit stránku 86
1 2 ... 82 83 84 85 86 87 88 89 90 91 92 93 94 95

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

Žádné komentáře