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

func symconst

MPE documents

Complete PDF
Table of Contents
Index

E0201 Edition 4 ♥
E0300 Edition 3
E0692 Edition 3

Returns the value of a declared constant.

Syntax



   symconst (pathspec)  

Formal Declaration



   symconst:any (pathspec:str)

Parameters


pathspec

A path specification, as described in chapter 5, "Symbolic Formatting/ Symbolic Access."

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 "Max Number of students = "  SYMCONST("MAXSTUDENTS")
   Max Number of students = $5

Returns the value of the constant MaxStudents.

Limitations, Restrictions


none




func symaddr


func syminset