is there any way to prevent type changing while using astring() - astore()?
Code:declare a[2]
a[1] = "a"
a[2] = 2.0
?type("a[2]") // N
x = astring(a,",")
=astore(aa,x,",")
?type("aa[2]") // C
Printable View
is there any way to prevent type changing while using astring() - astore()?
Code:declare a[2]
a[1] = "a"
a[2] = 2.0
?type("a[2]") // N
x = astring(a,",")
=astore(aa,x,",")
?type("aa[2]") // C
No it treats all items in the comma separated list as character strings.
You may want to look at json_encode() / json_decode() and metadata_encode() / metadata_decode() also.Code:for I=1 to alen(a)
if isdigit(a[i])
a[i] = val(a[i])
endif
endfor