Control Structures
The following control structures are supported:
- if condition then
statement
[elseif condition then
statement]
[else
statement]
end if
- select case expression
[case expression:
statement]
[else
statement]
end select
- for counter = start to / downto end [step
stepvalue]
statement
[exit]
statement
next
- while condition
expression
wend
- do
expression
loop until
- return
The "if" in "end if" and the "select" in "end select" are not
optional.
You can also write functions and subroutines.
- function name ([parameterlist]) as type
statement
[return [value of type]]
[statement]
end function
- Sub([parameterlist]
statement
[return [value of type]]
[statement]
end sub
Functions and subroutines must be defined before they are
used.
Parameters in functions and subroutines can be defined
byref or byval, byval being the default, except for
arrays.
Notes:
- You cannot use function within functions.
- Do not write endless loops, as this will block your computer.
- Avoid to create very big text strings within your loops or
your programm will crash.
www.belle-nuit.com -
11.6.4