Posts: 135
Threads: 33
Joined: Aug 2009
Is there any option with the debug command to show the elements of an array ?
Do you have a more elegant way to check arrays?
I am using a member function:
str.GetElements
Member function
str.GetElements
function ARRAY(str)'arr
; str s.GetElements(arr)
; out s
for int'i 0 arr.len
,str s.from(s i ":" arr[i] "[]")
this=s
Posts: 12,081
Threads: 142
Joined: Dec 2002
No, no. Usually I do for(i 0 a.len) out a[i], but your function also is good idea.
Posts: 135
Threads: 33
Joined: Aug 2009
My other question is how to pass arrays to a function in order to type cast:
In the above example I need two member functions(for strings and integers)
function ARRAY(str)'arr
function ARRAY(int)'arr
Any idea for one single member function? Thanks a lot.
Posts: 12,081
Threads: 142
Joined: Dec 2002
Will need 2 functions. Cannot use single function for different array types.
Posts: 135
Threads: 33
Joined: Aug 2009