|
|
Returns the type of a component described by the path specification.
Syntax
symtype (pathspec)
Formal Declaration
symtype:int (pathspec:str)
Parameters
- pathspec
The path specification as described in chapter 5,
"Symbolic Formatting/Symbolic Access." The last element of the path
must correspond to a user-defined type with a name.
Elements of type integer, array, or subrange
result in an error. Any value returned by this function may be used
successfully in the FT command.
Examples
$nmdebug > symopen gradtyp.demo
Opens the symbolic data type file gradtyp.demo. It is assumed that the
Debug variable 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 symtype("StudentRecord.NumGrades")
GRADERANGE
Print out the type name of the NumGrades field of a
StudentRecord.
Limitations, Restrictions
None.
|