Default values:
Default values are used in two ways: First is global, where You are
slightly limited. Global variables can contain only numbers, constants,
strings and lists. Nothing more. Local variables can contain everything.
Each variable can have its initial value/list/string:
DEF num=123:LONG,
float=456.789:FLOAT,
name='Hello World!\n':PTR TO CHAR,
list=[12,23,34,45,56]:UWORD
or more complex:
DEF num=12*3+232/6:LONG,
float=31/2.2+76.3:FLOAT,
name='Hello '+
'Amigans!\n',
list=[[1,2,3]:LONG,[4,5,6]:LONG,[7,8,9]:LONG]:PTR TO LONG
Variables do not must be defined before they are used, if they are
global it is definitely unimportant, if they are local there are some
limitations:
PROC main()
PrintF('n=\d, m=\d\n',n,m)
DEF n=1
ENDPROC
DEF m=2
is same as:
PROC main()
DEF n
PrintF('n=\d, m=\d\n',n,m)
n:=1
ENDPROC
DEF m=2
it means, that if you want to give to variable default value (n=1),
the value will be given on the place where it is defined (in our case
after it was printed)