Arrays

Arrays are "simulated" with nested variable definitions

Arrays are defined with []

 

that means

 

setvar=mycounter=5

meldung=myvariable[mycounter]

 

returns

meldung=myvariable5

 

linkage is possible:

 

setvar=mycounter=5

setvar=mycounter2=3

meldung=myvariable[mycounter1]_[mycounter2]

 

returns

meldung=myvariable5_3

 

That means that any dimensions are possible.

 

Set a variable with

setvar=myvariable[mycounter]=<value>

 

Be careful: mycounter HAS to be a variable

 

Example:

for mycounter = 1 to 10

 setvar=myvariable[mycounter]=%numadd(<mycounter>,5)

next

 

Set an array-variable WITHOUT counter:

No direct access possible because you have to specify a variable with [..].

Simulating array behaviour the solution is as simple as that:

 

setvar=mycounter=5

setvar=myvariable[mycounter]=MyValue

 

returns

 

setvar=myvariable5=MyValue