HP IBASIC Supplement 6-5
Debugging Programs
Examining Variables
Examining Strings
Enter string variables as you would any other variable. Any string
variable entered without delimiters will display as much of the string as
will fit on the display line of the screen (up to 58 characters).
To select only a section of a string, use the IBASIC substring syntax (see
the “HP Instrument BASIC Programming Techniques” section of the HP
Instrument BASIC Users Handbook). For example, to examine the 7
character substring starting at the second character of A$, enter
A$[2;7] on the command line or execute the command
PRINT A$[2;7].
Examining Arrays
To select an array to be examined, you can either select individual
elements or the entire array. For example, the following entry:
I_array(1),I_array(2),I_array(3)
selects the elements 1 through 3 of the array I_array to be displayed.
You may select an entire array to be examined by entering the array
variable name and specifying a wildcard (*) for the element (such as
I_array(*)). If I_array(20) is an integer array, and the first and second
elements are set to 100, entering I_array(*) would display the
following:
100100000000000000000000
Individual array elements (e.g., I_array(17)) can also be specified in the
same way as any other single variable.