Difference between revisions of "ArrayDeepDump"
Jump to navigation
Jump to search
Added a note about a Catch 22 when compiling a recursive function for the first time
imported>QQuix (User Function: ArrayDeepDump) |
imported>QQuix (Added a note about a Catch 22 when compiling a recursive function for the first time) |
||
Line 24: | Line 24: | ||
The function is recursive, therefore limited to OBSE's maximum of 30 nested function calls. | The function is recursive, therefore limited to OBSE's maximum of 30 nested function calls. | ||
There is a Catch 22 when you first compile a recursive function: the compiler will give an error at the line where the function calls itself because no such function exists yet. So I commented that line. After the first successful compilation, you should uncomment that line. | |||
==Examples:== | ==Examples:== | ||
Line 68: | Line 70: | ||
==Code== | ==Code== | ||
scriptname ArrayDeepDump | |||
array_var iaArray | array_var iaArray | ||
Line 195: | Line 197: | ||
set xNextLevel to xMode * 100 + xLevel + 1 | set xNextLevel to xMode * 100 + xLevel + 1 | ||
let sText := sPrefix + sKey1 | let sText := sPrefix + sKey1 | ||
;;;; call ArrayDeepDump aEntry [Value] , sText , xNextLevel, xDepth - 1 | |||
elseif xLevel == xDepth && xMode == 2 | elseif xLevel == xDepth && xMode == 2 | ||
let sLine := sPrefix + sKey1 + " . . ." | let sLine := sPrefix + sKey1 + " . . ." |