Block

From Free Pascal wiki
Revision as of 02:37, 29 November 2018 by Kai Burghardt (talk | contribs) (create)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Template:Translate A block is a sequence of declarations followed by a sequence of statements. The declarations are optional. The sequence of statements can be empty, but at least the beginend-frame has to be present.

The following is a valid block:

const
	foobar = -1;
type
	booleanArray = array of boolean;
var
	check: booleanArray;
begin
	check := booleanArray.create(true, false, true);
end;

An indication, whether something constitutes a block, is, whether you can use as part of a routine definition, as well as make a program out of it (syntactically; with the exception of the terminating dot).