previous next top contents index framed top this page unframed
Figure 32–16. $classInfo
| BOOLEAN PROCEDURE $classInfo (POINTER p; PRODUCES OPTIONAL STRING className,fieldNames, fieldTypes; PRODUCES OPTIONAL POINTER($classDscr) q; OPTIONAL POINTER($area) area); |
p is a POINTER to a dynamic record, CLASS descriptor, or data section. If p is invalid, FALSE is returned; otherwise, TRUE is returned, and the PRODUCES parameters are set. className is set to the name (all upper case) of the associated CLASS (i.e., to the same value returned by $className(p)). fieldNames is set to the non-PROCEDURE field names (all upper case) separated by eols, fieldTypes to the field type codes separated by eols. q is set to the CLASS descriptor for p (the CLASS descriptor for p may be obtained more efficiently by calling $dscrPtr). A unique CLASS descriptor exists for each CLASS currently in use. area specifies the destination area if any new STRING text is generated; see Section 29.4.
If a field is a data field of an explicitly sized type, the corresponding entry in fieldTypes is an extended type code, not a base type code (see Appendix A).
Example 32–17. Use of $classInfo
CLASS c (INTEGER i; REAL x; STRING s; POINTER(c) link); The PRODUCES parameters are set as follows:
className = "C" (where 2 = integerCode, 4 = realCode, 8 = stringCode, 11 = pointerCode). <eol> indicates an embedded end-of-line STRING. |
Section 50.1 describes a version of $classInfo, $classInfoExtended, that provides additional information about a CLASS. However, $classInfoExtended is a temporary feature.
MAINSAIL Language Manual, Section 32.21