TechTip: Displaying Array Contents in Debug

RPG
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

When you are running a program in debug mode, how do you display the contents of a variable? You respond, "By using the EVAL debug command, of course!" But have you tried that with an array that has more than 500 elements? The command EVAL MYARRAY will show only the first 500 elements of the array.

The debugger does provide a method for you to work around this by specifying the range of array elements to display. To specify the range, use the command EVAL MYARRAY(x..y) where x is the first element of the range and y is the last element of the range. For example, EVAL MYARRAY(501..600) would display elements 501 to 600 of the array MYARRAY. Furthermore, when you specify the range yourself, you can request more than 500 elements.

--Scott Mildenberger
This email address is being protected from spambots. You need JavaScript enabled to view it.
BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$