PxPlus User Forum
Main Board => Discussions => Language => Topic started by: Jeffrey Ferreira on April 09, 2020, 03:21:23 PM
-
Hello List,
is there any issue with putting hexadecimal values as the index of an associative array...
for example
dim LINE_ARRAY
LINE_ARRAY[$00FE00$]=1
It seems to work but am I asking for trouble?
Jeff
-
There should not be any problem unless you plan to try and convert the array to JSON as the hex character values will not result in valid JSON variable names.
Internally the keys values for the associative arrays are maintained in a hash table that uses the string length and contents so it won't really care if the values are printable characters or not.
-
Thanks Mike,
i will get rid of my long compound strings and convert to associative arrays.
jeff