Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
RealityV15.1Online Documentation (MoTW) Revision 7
/ command (DataBasic debugger) (m618706+slash.htm)
Displays, and allows you to modify, the value of (any part of) a variable.
{X} / variable-name{(row{,column})} {<attr#{,value# {,subvalue#}}>} {[start#{,length}]}
{X} / *
variable-name Specifies one of the following:
Optionally, you can additionally specify a particular dimensioned array element, dynamic array field and substring.
*Specifies displaying the values of all the variables and arrays in the program.
X Specifies that the display and input will be in hexadecimal. X precedes the command.
When you issue the / command, the system displays the value of the variable followed by an equal sign (=). The = is a prompt for input.
If there is no current value for the variable, the system displays the value as <undefined>.
If you use a variable name not found in the program, the debugger displays:
Symbol not found.
Note: The / command searches the symbol table for the variable you entered:
Symbol not found
message is displayed.If you use the / command and did not first compile a symbol table, the following message is displayed:
No symbol table.
At the = prompt, press RETURN to return to the Debugger prompt. The value of the variable remains unchanged.
At the = prompt, you can type in a new value for the variable. The new value remains in effect during further program execution until it is assigned a new value by the program. For example:
*/CITY
ROME=PARIS
This command displays the value of variable CITY which is ROME. The value is changed to PARIS by typing the new value after the equals sign.
If you enclose the new value in single or double quotes, these will be removed before assignment to the variable or array element. For example:
*/CITY
ROME="PARIS"
*/CITY
PARIS=
To include the enclosing quotes as part of the value, enclose the value in two pairs of quotes - ""PARIS""
:
*/CITY
ROME=""PARIS""
*/CITY
"PARIS"=
To set a variable or array element to a null string, use just a pair of double or single quotes:
*/CITY
ROME=""
*/CITY
=
Notes:
If variable-name is a dimensioned array and you did not specify a single element of the array in the / command, pressing RETURN displays the next element of the array. Press BREAK (CTRL+BREAK on some terminals) to discontinue displaying each array element and to return to the Debugger prompt.
If an entire array has been specified and each element is displayed individually, you can change each element in turn. To stop the display of array elements, press BREAK (CTRL+BREAK on some terminals).
If you specify only a single value in the substring specification, it is interpreted as a negative offset and a positive length. For example [6] is equivalent to [-6,6].
If the display is in hexadecimal, any input is assumed to be in hexadecimal. If the display is in character format, any input is assumed to be in character format.
If the display is in character format, a hexadecimal value can be input by typing a (.) followed by the two-character ASCII hexadecimal equivalent of the desired character. The (.) must be typed prior to each hexadecimal character.
Type CTRL+D at the = prompt to redisplay the value in another format. If the display is in hexadecimal, CTRL+D redisplays the value in character format and if the display is in character format, CTRL+D redisplays the value in hexadecimal format.
Any system delimiters contained in a displayed variable are changed to printable characters. All other control characters are converted to tildes (~). Because this conversion also takes place when a statement is executed by single-stepping with the Debugger, the Debugger display is not interrupted by program-generated cursor control.
If the /* form of the command is used, the variables are displayed but you cannot modify them.
*/NAME(3)
Displays the value of the third element in the array NAME.
*/NAME
Displays the value of every element of array NAME.
*/*
Displays the values of all the variables in the program.
*/GRID(4,5)
Displays the value in the fourth row, fifth column of the matrix GRID.
*/HOURS
Displays the value of the variable HOURS.
*/ITEM<3,2,1>
Displays the first subvalue in the second value in the third attribute of the dynamic array ITEM.
*/FILES(3,6)<1,4,2>
Displays the second subvalue in the fourth value in the first attribute held in the third row of the sixth column of the dimensioned array FILES.