Begin - end

Top  Previous  Next

"Begin" and "end" are used to designate blocks of code. A block consists of one or more statements that are combined to form a single new statement. This statement has the form:




Note that statements within the block are separated by semicolons.


Each "begin" must have a matching "end". A common programming error is mismatched "begin-end" pairs.


Square brackets ([ ]) can be used instead of "begin" and "end". For example, this is a block:


        [X:= 12;   Y:= 5]