Programming‎ > ‎RobotC‎ > ‎1. The Basics‎ > ‎

a. Syntax

Syntax refers to the grammar of programming.  
Syntax includes all of the following:
  • Capitalization
  • Word / Term order
  • Punctuation
In the English language sentences are constructed with words with specific capitalization arranged in an order ending with a period.  Sentences are made up of reserved words that can be found in a dictionary and words that are made up such as names.

For the C programming language, there is a similar syntax made up of words with specific capitalization in an order ending with a semicolon.  "Sentences" in C are made up of reserved words that are defined in the C language and words that are made up by the user such as variable, function and task names.

int numberOfRotations = 0;

In English, sentences are strung together to form paragraphs, paragraphs are combined to make chapters.  The order of the sentences are important.  In RobotC this is also the case.  Lines of code are combined similar to sentences into functions.  functions are combined together into includes.  The order of the lines of code are also important.  For this reason RobotC is known as procedural or structured code.  You can read the code in order, just as you would read a story in order. 

Next Page: Variables