Difference between revisions of "PLC Project"

From Marek Běhálek Wiki
Jump to navigation Jump to search
Line 1: Line 1:
= Language Specification =
+
== Language Specification ==
 +
 
 +
=== Program's formatting ===
 +
 
 +
The program consists of a sequence of commands. Commands are written with free formating. Comments, spaces, tabs and line breaks serve only as delimiters and do not affect the meaning of the program. Commnets are bounded by two slashes and the end of the line. Keywords are reserved. Identifiers and keywords are case sensitive.
 +
 
 +
=== Variables ===
 +
 
 +
Variable's identifiers are composed from letters and digits and it must start with a letter. Each variable must be declared before it is used. Repeated declaration of a variable with the same name is an error. Variables must have one of the following types: <code>int</code>, <code>float</code>, <code>boolean</code> or <code>String</code>. After the declaration, the variables have initial values: <code>0</code>, <code>0.0</code>, <code>""</code> respectivelly <code>False</code>.

Revision as of 12:34, 14 March 2022

Language Specification

Program's formatting

The program consists of a sequence of commands. Commands are written with free formating. Comments, spaces, tabs and line breaks serve only as delimiters and do not affect the meaning of the program. Commnets are bounded by two slashes and the end of the line. Keywords are reserved. Identifiers and keywords are case sensitive.

Variables

Variable's identifiers are composed from letters and digits and it must start with a letter. Each variable must be declared before it is used. Repeated declaration of a variable with the same name is an error. Variables must have one of the following types: int, float, boolean or String. After the declaration, the variables have initial values: 0, 0.0, "" respectivelly False.