Next: , Previous: 6.6, Up: 6


6.7 Null Procedures

1/2
A null_procedure_declaration provides a shorthand to declare a procedure with an empty body.

Syntax

2/2

null_procedure_declaration::=
   [overriding_indicator]
   procedure_specification is null;
Static Semantics

3/2
A null_procedure_declaration declares a null procedure.A completion is not allowed for a null_procedure_declaration.

Dynamic Semantics

4/2
The execution of a null procedure is invoked by a subprogram call. For the execution of a subprogram call on a null procedure, the execution of the subprogram_body has no effect.

5/2
The elaboration of a null_procedure_declaration has no effect.

Examples

6/2

     procedure Simplify(Expr in out Expression) is null; −− see 3.9
     −− By default, Simplify does nothing, but it may be overridden in extensions of Expression