MAINSAIL Language Manual, Section 50.1

previous   next   top   contents   index   framed top   this page unframed


50.1. $valueInfo: $fieldInfoExtended, $classInfoExtended, and $createClassDscrExtended

Temporary feature: subject to change

$fieldInfo, $classInfo, and $createClassDscr use a representation of a CLASS that is not sufficiently general to describe everything that can be in a MAINSAIL CLASS. As a temporary feature, more general forms of these PROCEDUREs (named $fieldInfoExtended, $classInfoExtended, and $createClassDscrExtended, respectively) provide a more complete description of a MAINSAIL CLASS. These PROCEDUREs use records of the CLASS $valueInfo to describe the fields of a CLASS:

CLASS $valueInfo (
    
STRING              $valueName;
    
INTEGER             $valueType;
    
LONG INTEGER        $valueDspl;
    
STRING              $valueBounds;
    
POINTER($classDscr$valueClass;
    
POINTER($valueInfo$valueNext;
    );

One record is allocated for each CLASS field described. The meanings of the fields of $valueInfo for a field f of a CLASS c are as follows:

Although the PROCEDUREs that use $valueInfo are more general than the corresponding older PROCEDUREs, they are still not sufficiently general to describe a MAINSAIL CLASS completely (for example, there is no way to distinguish between a POINTER and a dynamic ARRAY). Accordingly, the $valueInfo CLASS and all the PROCEDUREs that use it are subject to change (or replacement with completely different facilities) in a future version of MAINSAIL.

50.1.1. $fieldInfoExtended

Temporary feature: subject to change

POINTER($valueInfo)
PROCEDURE   $fieldInfoExtended
                        (
POINTER p;
                         
STRING fieldName;
                         
OPTIONAL POINTER($areaarea;
                         
OPTIONAL POINTER($valueInfo)
                             
recToUse);

$fieldInfoExtended returns a POINTER to a $valueInfo record describing the field named fieldName of the record or CLASS descriptor pointed to by p. If recToUse is specified, it is reused (its fields are filled in and the same POINTER is returned). Newly allocated data (if any) go into area.

50.1.2. $classInfoExtended

Temporary feature: subject to change

POINTER($valueInfo)
PROCEDURE   $classInfoExtended
                        (
POINTER p;
                         
PRODUCES OPTIONAL STRING
                             
className;
                         
PRODUCES OPTIONAL
                             
POINTER($classDscrcd;
                         
OPTIONAL POINTER($areaarea);

$classInfoExtended returns a POINTER to a linked list of $valueInfo records describing the fields associated with p. className, cd, and area have the same meaning as the corresponding parameters to $classInfo.

50.1.3. $createClassDscrExtended

Temporary feature: subject to change

POINTER($classDscr)
PROCEDURE   $createClassDscrExtended
                        (
STRING className;
                         
POINTER($valueInfofieldList);

$createClassDscrExtended creates a CLASS descriptor at runtime for a new CLASS named className with the fields specified by fieldList.


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 50.1