The easiest way to display data or an expression is to use F11 (Display variable) on the Display Module Source display. Place your cursor on the variable that you want to display and press F11. The current value of the variable is shown on the message line at the bottom of the Display Module Source display.
In cases where you are evaluating structures, records, classes, arrays, pointers, enumerations, bit fields, unions or functions, the message returned when you press F11 (Display variable) may span several lines. Messages that span several lines are shown on the Evaluate Expression display to show the entire text of the message. Once you have finished viewing the message on the Evaluate Expression display, press Enter to return to the Display Module Source display.
The Evaluate Expression display also shows all the past debug commands that you entered and the results from these commands. You can search forward or backward on the Evaluate Expression display for a specified string, or text and retrieve or re-issue debug commands.
Example:
This example shows you how to use the F11 (Display variable) to display a variable.
+--------------------------------------------------------------------------------+ | Display Module Source | | Program: T1520PG1 Library: MYLIB Module: T1520IC2 | | 47 if (j<0) return(0); | | 48 if (hold_formatted_cost[i] == '$') | | 49 { | | 50 formatted_cost[j] = hold_formatted_cost[i]; | | 51 break; | | 52 } | | 53 if (i<16 &&; !((i-2)%3)) | | 54 { | | 55 formatted_cost[j] = ','; | | 56 --j; | | 57 } | | 58 formatted_cost[j] = hold_formatted_cost[i]; | | 59 --j; | | 60 } | | 61 | | More... | | Debug . . . ___________________________________________________________ | | ________________________________________________________________________ | | F3=End program F6=Add/Clear breakpoint F10=Step F11=Display variable | | F12=Resume F17=Watch variable F18=Work with watch F24=More keys | | hold_formatted_cost = SPP:C048BD0003F0 | +--------------------------------------------------------------------------------+
Messages with multiple line responses will cause the Evaluate Expression display to be shown. This display will show all response lines. It also shows a history of the debug commands entered and the results from these commands. To return to the Display Module Source display, press the Enter key. You can use the Enter key as a toggle switch between displays. Single-line responses will be shown on the Display Module Source message line.
You can also use the EVAL debug command to determine the value of an expression. For example, if j has a value of 1024, enter eval (j * j)/512 on the debug command line. You use the QUAL debug command to determine the line or statement number within the function that you want the variables scoped to for the EVAL debug command. The Evaluate Expression display shows (j * j)/512 = 2048.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.