Home › Forums › Problems and solutions in GDL › Parameter connections › Newparameter › Reply To: Newparameter
April 8, 2016 at 08:10
#2373
Szabadi Gergely
Participant
Thank you very much for your answer, so it seems that I can’t concanenate strings to refer a variable name. Does anybody know how to shorten these:
variables: a1, a2, a3, a4, a5
for i=1 to 5
values{2} "a"+str(i,1,0) 1, 'opt1', 2, 'opt2'
next i
if a1=1 then
...
endif
if a2=1 then
....
endif
etc.
if a string can equal to a string, than why is this not working?
for i=1 to 4
if "a"+str(i,1,0)='opt1' then
....
endif
next i
G. Szabadi