Local

Prev Next Home Home Table Of Contents Index

Local : Array

Parameters passed to procedures and local variables in a procedure are elements of an array of local variables. By using the word Local you can address passed parameters and local variables as if they were elements of an array.


Example:
Procedure Test (A,B) var C,D Writeln A B C D EndProc

In the above example the variable A is the same as Local[1], B is Local[2], C is Local[3], and D is Local[4]. The Local command can be used to pass a varying number of parameters to a procedure as follows:


Example:
Procedure Test Loop Local Writeln LoopVal endloop EndProc

Test (1,2,3,4)

This example writes the numbers 1 through 4

The procedure Test will accept and process any number of parameters you wish to pass to it.

Category: Array

Prev Next Home Home Table Of Contents Index

Sponsors
Shopping
Forum
Forum
email
EMail
Index
Index
Home
Home