Name |
Notation |
Description |
array |
array [istart .. iend] of type |
declares an array with length (istart - iend) where istart is the first and iend the last index |
integer |
integer |
64-bit integer |
double |
double |
64-bit floating-point |
Literal |
Description |
+ |
addition |
- |
subtraction |
* |
multiplication |
div |
integer division |
mod |
modulo |
:= |
becomes |
>= |
greater than or equal |
<= |
less than or equal |
= |
equal |
<> |
not equal |
> |
greater than |
< |
less than |
and |
logical and |
or |
logical or |
to |
ascending range |
downto |
descending range |
Literal |
Description |
[] |
array subscript |
() |
function call |
Statements need to be delimited if immediately followed by a new statement.
Delimited expressions become expression statements.
Keyword |
Description |
program |
named module |
var |
variable declaration |
const |
constant definition |
`procedure |
procedure declaration |
function |
function declaration |
forward |
forward declaration |
exit |
exits function or program |
Control |
Description |
begin ([[statement]];)+ end |
compound statement |
for [[range assignment]] do [[statement]] |
for loop |
if [[boolean expression]] then [[statement]] else [[statement]] |
condition branching |
while [[boolean expression]] do [[statement]] |
while loop |
Name |
Description |
dec |
Decrement integer. |
inc |
Increment integer. |
readln |
Read to variable from a line of standard input. |
write |
Write variable to standard output. |
writeln |
Write variable to standard output and append new line. |
Literal |
Description |
; |
statement delimiter |
: |
type denotation |
( |
opening parenthesis |
) |
closing parenthesis |
, |
comma |