Page 1 of 1

Array question

Posted: Thu Aug 23, 2012 8:10 pm
by marksmithhfx
if I want to use a variable instead of a literal for "object_label" in the following:

put parameter_value into myArray[1]["object_label"] // store the new value

what is the correct syntax? I've tried:

put quote & parameter_name & quote into tString
put parameter_value into myArray[1][tString] // store the new value

but that didn't work.

-- Mark

Re: Array question

Posted: Thu Aug 23, 2012 8:19 pm
by mwieder
The syntax is correct, but don't put quotes around the parameter_name unless you really want quotes around it.

Re: Array question

Posted: Thu Aug 23, 2012 9:31 pm
by marksmithhfx
mwieder wrote:The syntax is correct, but don't put quotes around the parameter_name unless you really want quotes around it.
Thanks Mark, removing the quotes fixed the problem.