HPlogo System Debug Reference Manual > Chapter 11 System Debug Standard Functions

func symtype

MPE documents

Complete PDF
Table of Contents
Index

E0201 Edition 4 ♥
E0300 Edition 3
E0692 Edition 3

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.




func symlen


func symval