In writing a complex form with many function calls, during debugging I would like to determine whether a passed variable is actually passed as a string or an array. I can determine this with a MelTrace but would like to insert a Type(passedVar) in a userok to follow the progress of data flow.
Does anyone know is such a function exists in MEL or have a work-around to use within the white space coding userok() call such as Type(TempAry) = array if array or Str if actually a string.
Otherwise when things go haywire, I use a userok("CHECK POINT" + str(item) + '\r\nSize" + str(size(item)) ) then do a Ctrl-F to find this spot in the MelTrace.
Appreciate any ideas or suggestions
I don't know of a symbol to do that. You could use OBSNOW(,"SOMEOBSNAME",variable) to test. If it errors out/is empty it is a number and if it works it is a string.
Just an idea - insert() works with strings and arrays, you could take size of the variable, insert a two character string, and take size again. If it increases by two, then its a string, if it increases by one, its an array. Will only work with those two types, but you could probably find a similar way to check integer v a string.