Reply To: Newparameter

#2369
Joachim Sühlo
Participant

Normally you can write:

DIM _param_value[]

_param_value[1] = 'opt1'
_param_value[2] = 'opt2'
_param_value[3] = 'opt3'
_param_value[4] = 'opt4'
_param_value[5] = 'opt5'
_param_value[6] = 'opt6'

VALUES "param1" _param_value

But this does not work with VALUES{2}, I do not know why.
Instead this works, but I don’t know if this is what you wanted.

DIM _param_val[]

_param_val[1] = 1
_param_val[2] = 'opt1'
_param_val[3] = 2
_param_val[4] = 'opt2'
_param_val[5] = 3
_param_val[6] = 'opt3'

VALUES{2} "param2" _param_val[1], _param_val[2], _param_val[3], _param_val[4], _param_val[5], _param_val[6]

And you can loop it like this:

FOR i = 2 TO 3
VALUES{2} "param" + STR(i,1,0) _param_val[1], _param_val[2], _param_val[3], _param_val[4], _param_val[5], _param_val[6]
NEXT i

GDL Object Developer
b-prisma
MAC OSx 10.12