Basic Syntax
1. Instruction Separation
As in C, GPC requires instructions to be terminated with a semicolon at the end of each statement. However, the closing tag of a block code automatically implies a semicolon, so a semicolon is not need to terminating the last line of a GPC block.
2. Block Statement
A group of statements which are bonded together to form a logic are called block statements. Block statement begins with a { and ends with a }.
3. Defines
Defines a named constant at compile time. Defines MUST be defined before the main procedure.
define <name> = <value>;
- <name>: The name of the constant.
- <value>: The value of the constant; only scalar values are allowed.
4. Comments
GPC supports C style comments. For example:
The "one-line" comment style only comment to the end of the line. Multi-line style comments end at the first */ encountered. Make sure you don't nest C style comments. It is easy to make this mistake if you are trying to comment out a large block of code.
|