03-05-2015, 01:25 PM
Hi Gintaras,
Is there any way to fill an integer array as easily as it is to fill a one-dimensional string array by setting it equal to a str collection.
I just though of val(_s) technique - see below. But this is still longer than a single set statement.
Thanks, S
Is there any way to fill an integer array as easily as it is to fill a one-dimensional string array by setting it equal to a str collection.
I just though of val(_s) technique - see below. But this is still longer than a single set statement.
Thanks, S
str StringColl = "One[]Two[]Three[]Four[]Five"
ARRAY(str) arrStringVars = StringColl
for _i 0 arrStringVars.len
,out arrStringVars[_i]
,
;Integer Array = 1 2 3 4 5
ARRAY(int) arrIntVars
arrIntVars[] = 1
arrIntVars[] = 2
arrIntVars[] = 3
arrIntVars[] = 4
arrIntVars[] = 5
out "[]"
for _i 0 arrIntVars.len
,out arrIntVars[_i]
,
arrIntVars.redim
str strIntColl = "1[]2[]3[]4[]5"
foreach _s strIntColl
,arrIntVars[] = val(_s)
out "[]"
for _i 0 arrIntVars.len
,out arrIntVars[_i]