6.7 Null Procedures
This Reference Manual output has not been verified, and may contain omissions or errors. Report any problems on the tracking issue
null_procedure_declaration provides a shorthand to declare a procedure with an empty body.
null_procedure_declaration is a completion, it shall be the completion of a
generic_subprogram_declaration. The profile of a
null_procedure_declaration that completes a declaration shall conform fully to that of the declaration.
null_procedure_declaration that is not a completion declares a null procedure. A completion is not allowed for a
null_procedure_declaration; however, a
null_procedure_declaration can complete a previous declaration.
The execution of a null procedure is invoked by a subprogram call. For the execution of a subprogram call on a null procedure, or on a procedure completed with a
null_procedure_declaration, the execution of the
subprogram_body has no effect.
The elaboration of a
null_procedure_declaration has no other effect than to establish that the null procedure can be called without failing the Elaboration_Check.
Example of the declaration of a null procedure:
procedure Simplify(Expr : in out Expression) is null; -- see 3.9 -- By default, Simplify does nothing, but it can be overridden in extensions of Expression