The Avail Programming Language
Mobile Users: Click here to view our text rendering warning.

Initialization

A single phrase specifying a new variable's name, type, and initial value. The value may be any expression that evaluates to the given type. (An initialization statement, like any statement, ends in a semicolon.)

Grammar: VARNAME : VARTYPE := EXPRESSION
Example: airTemp : integer := 75

Note that initialization (of a variable) differs from definition (of a constant) in one way: since a constant's value cannot change, its type is implicit. Since variable values can change, through the use of an assignment, the variable itself is given a type which must be a supertype of any values assigned.

Variables may also be created, without setting their initial value, through declaration.