System Debug Reference Manual (32650-90888)
468 Chapter10
System Debug Standard Functions
func sys
addr
contains the address of a StudentRecord data structure in virtual memory. The
following code fragment is from this file:
CONST MINGRADES = 1; MAXGRADES = 10;
MINSTUDENTS = 1; MAXSTUDENTS = 5;
TYPE
GradeRange = MINGRADES .. MAXGRADES;
GradesArray = ARRAY [ GradeRange ] OF integer;
Class = ( SENIOR, JUNIOR, SOPHOMORE, FRESHMAN );
NameStr = string[8];
StudentRecord = RECORD
Name : NameStr;
Id : Integer;
Year : Class;
NumGrades : GradeRange;
Grades : GradesArray;
END;
$nmdebug > wl symval(addr "StudentRecord.Name")
Bill
$nmdebug > wl symval(addr, "StudentRecord.Year")
SENIOR
$nmdebug > IF symval(addr "StudentRecord.Year") = "SENIOR" THEN wl
"GRAD!"
GRAD!
Refer to the section "Using the Symbolic Formatter" in chapter 5 for more examples
including pointers, arrays, and variant/invariant record structures.
Limitations, Restrictions
The path specification used by the SYMVAL function must evaluate to a simple type or a
string. In particular, SYMVAL does not return an array, a record, or a set data structure.
func sys
Coerces an expression into a SYS logical code pointer (LCPTR).
Syntax
sys (
value
)
During the evaluation of the parameter to this function, the search path used for
procedure name lookups is limited to the system library file (SYS).