Next: Pragma Priority_Specific_Dispatching, Previous: Pragma Prefix_Exception_Messages, Up: Implementation Defined Pragmas [Contents][Index]
Syntax:
pragma Pre_Class (Boolean_Expression);
The Pre_Class pragma is intended to be an exact replacement for the language-defined Pre’Class aspect, and shares its restrictions and semantics. It must appear either immediately following the corresponding subprogram declaration (only other pragmas may intervene), or if there is no separate subprogram declaration, then it can appear at the start of the declarations in a subprogram body (preceded only by other pragmas).
Note: This pragma is called Pre_Class rather than Pre’Class because the latter would not be strictly conforming to the allowed syntax for pragmas. The motivation for providing pragmas equivalent to the aspects is to allow a program to be written using the pragmas, and then compiled if necessary using an Ada compiler that does not recognize the pragmas or aspects, but is prepared to ignore the pragmas. The assertion policy that controls this pragma is Pre’Class, not Pre_Class.