ABSTRACT forward procedures
Posted: Thu Oct 06, 2016 8:33 am
I don't understand why the following code is illegal. If, in the procedure declarations, I replace ABSTRACT by EMPTY it is also illegal. If I use EXTENSIBLE (and add an empty procedure body to the middle procedure) it is ok.
Is this behaviour described in the Language Reference?
Code: Select all
MODULE PrivTest;
TYPE
Thing* = POINTER TO ABSTRACT RECORD END;
StdThing = POINTER TO RECORD (Thing) END;
PROCEDURE^ (mf : Thing) React* (n : INTEGER), NEW, ABSTRACT;
(* Code that calls Thing.React *)
PROCEDURE (mf : Thing) React* (n : INTEGER), NEW, ABSTRACT;
PROCEDURE (mf : StdThing) React* (n : INTEGER);
BEGIN (* do stuff *) END React;
END PrivTest.
Is this behaviour described in the Language Reference?