|
A Procedure is a part of independent code of main program that can have parameters, and independent variables.
You can call procedures as parameters of functions or another procedures, or call procedures inside procedures.
Procedure - ProcedureReturn - EndProcedure commands:
After define a procedure you can use it as a command of VMM Basic, the parameters of procedures are automaticly declared
as Local variables, and its types must be defined on Procedure command. When a procedure is called a new enviroment
for this variables its created to be able the recurrence (a procedure call itself)
ProcedureReturn its another
method to return a value on a procedure, you can use multiples return values using this command, when its executed,
VMM Basic stops the procedure execution such as EndProcedure command.
Syntax:
Procedure ProcName([Parameters])
| [Instructions]
[ProcedureReturn ReturnVariable]
| |
EndProcedure(ReturnVariable)
VMM Basic its designed to use procedures up to 16 parameters (Use "," as parameter split character Procedure Name(one.type, two.type, three.type)).
|
|