MAINSAIL Language Manual, Section 48.7

previous   next   top   contents   index   framed top   this page unframed


48.7. thisDataSection

Figure 48–7. thisDataSection
$BUILTIN
POINTER(class of current module)
PROCEDURE   thisDataSection;

thisDataSection returns a POINTER to the data section of the MODULE from which it is called. It returns a POINTER classified consistent with the declaration of the current MODULE, if a declaration for the current MODULE's interface has been seen. It returns an unclassified POINTER if no interface declaration for the current MODULE has been seen at the point of call.

Thus, an error occurs while compiling the following MODULE:

BEGIN "foo"

CLASS c (...);
CLASS d (...);

MODULE(cfoo;

POINTER(ddp;

INITIAL PROCEDURE;
dp := thisDataSection;  # errorthisDataSection is of CLASS c,
                        # 
not of CLASS d

END "foo"

previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 48.7