A statement is the smallest independent computational unit in EGL
and specifies an action to be performed. In most cases, statements
are run in sequence. EGL supports the following kinds of statements:
- Variable or constant declarations, which reserve storage. Either
kind of declaration can be anywhere in a function except in a block
(described later). See Declaring variables and constants.
- Imperative statements, which include:
- Function calls, which direct processing to a function. See Calling a function.
- Set-values blocks used to assign values to variables that you
have already declared. See "Set-values blocks."
- EGL keyword statements of the following kinds:
- Data movement statements, which include assignments.
- Conditional and loop statements, which direct program flow.
- Transfer of control statements, which pass control from one program
or handler to another.
- Exception handling statements.
- Data access statements, which interact with databases and other
data sources. These statements depend heavily on the type of data
access the you use; see the related reference at the end of the topic
for any technologies that you might be using.
- UI statements, which deal with user input and output. As with
data access, the availability of these statements depends on the technologies
you might be using. See the related reference at the end of the topic.
A statement either ends with a semicolon or with a block,
which is a series of subordinate statements that act as a unit. The
block terminates with an end delimiter.
Names in statements and throughout an EGL source file are case-
insensitive.
For example,
record1 is identical to
RECORD1, and both
add and
ADD refer
to the same keyword. The following situations are exceptions:
- The name of a main part such as a Program must be the same as
the name of file, and the name is case sensitive.
- The name of an EGL package is case sensitive.
- Some UI technologies also have case issues.
See also Comments.
Statements, like parts, can include properties (name-value pairs
with additional information about the statement). For each statement
that has properties you can find a topic dealing with those properties.