Variables
Ola language Variables can have any name which does not start with a number.
Identifier
Variables consist of numbers (0-9
), ASCII uppercase and lowercase letters (a-zA-Z
), underscores (_
). Variables cannot start with a number, and cannot use
Declaration
Variables need to be declared in order to be used. To avoid variables being undefined, it needs to be initialized at declaration time.
Scope
For security reasons, variable definitions do not support Shadowing. If you need multiple adjacent variables with similar logical meanings, use a variable or type suffix.
Variables differ from constants in that the scope of a variable is limited to the current function itself and global variables are not supported.
Variables in a For-Loop
loop are scoped only inside the loop.
Last updated