Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Debugging Arrays
#1
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
Code:
Copy      Help
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
#2
No, no. Usually I do for(i 0 a.len) out a[i], but your function also is good idea.
#3
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.
#4
Will need 2 functions. Cannot use single function for different array types.
#5
Thanks for your help.


Forum Jump:


Users browsing this thread: 1 Guest(s)