4.6.1. Variables¶
-
VariableDeclaration <-
¶Type
identifier
';'
Compile-time Behavior:
A variable declaration specifies the type and name of a variable but not its initial value. This is only used in
HeaderFile
s as part of API boundaries.Runtime Behavior:
A variable declaration has no runtime behavior.
-
VariableDefinition <-
¶Type
identifier
'='
Expression
';'
Compile-time Behavior:
A variable definition specifies the type, name, and initial value of a variable. If the expression has a type which is not the type specified for the variable, an error must be emitted.
Runtime Behavior:
When a variable definition is executed, the expression is evaluated, and its result is made available with the given name.