variables.md 690 B

Variables and Consts

Local variables

Local variables live on the stack. To declare a local variable:

Local identifier : Type [ = Expression ] ...or... Local identifier := Expression

Global variables

Global variables live in global memory and exist for the lifetime of the application. To declare a global variable:

Global identifier : Type [ = Expression ] ...or... Global identifier := Expression

Consts

Consts are stored in the same way as globals, but cannot be modified after they are initialized. To declare a const:

Const identifier : Type = Expression ...or... Const identifier := Expression