3. Protect yourself from an excess of messages#

The person responsible for an order is responsible for the level 1 prints of that order. He must document them and arrange for the message file to remain legible.

A problem arises when a command uses a utility that prints level 1 INFO that the person responsible for the order considers uninteresting (or too numerous… for example in a loop). The command must be given the means to « silence » the utility. To do this, we have 2 routines:

  • INFMUE () to return the code « MUET » until further notice,

  • INFBAV () to put the code back into « BAVARD » mode.

These 2 routines are only effective if the required printing level is 1: you cannot prevent the code from « talking » if INFO = 2.

Example:

Command OP000I doesn’t want to hear what routine B is saying

SUBROUTINE OP000I

CALL INFMAJ

...

CALL A (...)

...

CALL INFMUE ()

CALL B (...)

CALL INFBAV ()

...

END

Notes:

  • This system is not perfect because it only allows the flow of prints to be interrupted indiscriminately. It does not allow, for example, to forbid B to speak while letting C (called by B) speak!

  • For INFMUE/INFBAV to be effective, the routines you want to silence must have programmed their level 1 impressions as follows

IF (NIV .GE.1) WRITE…

  • The routines INFMUE and INFBAV change the print level (temporarily) ( NIV ). But within the routine where they are called, they obviously cannot change the value of the local variable NIV. In the example above, if the routine OP000I wants to print out INFO after the call to INFMUE , it should « update » the variable NIV by calling the routine again INFNIV .