Difference between revisions of "User:QQuix/Array sample code"

m
Minor text and code changes
imported>QQuix
(Array deep dump - sample code)
 
imported>QQuix
m (Minor text and code changes)
This code has the same debugging purpose as ar_Dump, but intended to show the contents of nested arrays, or arrays within arrays.
 
It dumps the array to the console and to a text file (requires Pluggy), but either can be easily removed, if you prefer. It is also easy to customize the contents and formatting to your liking.
 
It has two modes.
let sTab := sTab5
set xNext to 0
;=== Add additional ElseIf's here to to handle deeper arrays ===
endif
StringToTxtFile psFile psLine
endif
setif xNextLevelxNext ; tostops xLevelrecursion +at 1the last level initialized
let aaqqArrayDump.gaKeys [set xNextLevel] :=to xLevel + sKey11
let aaqqArrayDump.gaArraysgaKeys [xNextLevel] := aEntry [Value] sKey1
let aaqqArrayDump.gaArrays [xNextLevel] := aEntry [Value]
xNext.activate2 xSelf 1
ar_Erase aaqqArrayDump xNext.gaKeysactivate2 xSelf xNextLevel1
ar_Erase aaqqArrayDump.gaArraysgaKeys xNextLevel
ar_Erase aaqqArrayDump.gaArrays xNextLevel
endif
endif
loop
Anonymous user