Code_Aster ®
Version
4
Titrate:
Impressions directed by key word INFO of the commands
Date:
02/05/1997
Authors:
J. PELLET
Key:
D6.04.02
Page: 1/4
Department Mécanique and Modèles Numériques
Index:
With
Diffusion:
Developers
Handbook of Descriptif Informatique
D6.04 booklet:
D6.04.02 document
Impressions directed by key word INFO
commands (package INFXXX)
Summary:
This document indicates how the developers must carry out the impressions directed by the word
key INFO of the commands.
EDF
Direction of Etudes and Recherches
Electricity of France
Project Code de Mécanique
Copyright EDF/DER 1997
Code_Aster ®
Version
4
Titrate:
Impressions directed by key word INFO of the commands
Date:
02/05/1997
Authors:
J. PELLET
Key:
D6.04.02
Page: 2/4
1
Introduction
The information directed by key word INFO of the commands is message of information (INFO)
concerning the course of calculation. They contractual (for level 1) and are documented in
documentation of use.
Notice historical:
Until 1995, many commands comprised a key word “IMPR” of which the argument
could be worth: 0, 1, 2, 3,…. The effect of this key word was varied: writing of information, results,
data… on file “MESSAGE” or “RESULTAT”. To clarify the situation, we have
decided to reabsorb gradually these key word IMPR by key word INFO (for the INFO) and
possible key word of impressions for the impression of the results.
The more detailed description of than is (or what is not) a INFO is made in [D2.07.01 §6],
in short:
·
a INFO is neither a result, nor an alarm…,
·
key word INFO can take 2 values: 1 or 2; the defect is 1,
·
the impressions are made by “WRITE” and not UTMESS <I> [D6.04.01 §1.5],
·
the INFO are written on file “MESSAGE”
The impressions being made by of WRITE formatted, the only problems to be regulated are:
·
on which logical unit?
·
how to respect the choice of the user: INFO = 1 or 2?
This been the subject of paragraph 2.
Another problem occurs when a command does not want a message printed systematically
by a utility routine. This been the subject of paragraph 3.
2
How to transmit a message of information?
·
Routine INFMAJ is used to inform “package” INFXXX of the level as impressions required by
the user,
·
routine INFNIV is used to recover the level of impression required by the user like
the logical unit of file “MESSAGE”.
·
the programmer of a command will thus make:
has
to put key word INFO in the catalog of the command,
(2 possible values 1 and 2, default value: 1),
B
in routine OP000I
CAL GETVIS ('', “INFORMATION”, 0, 1, 1, NIV, IBID)
CAL INFMAJ (NIV)
C
in a routine wanting to print INFO:
-
CAL INFNIV (IFM, NIV),
-
for a INFO of level 1 (contractual):
IF (NIV.GE.1) WRITE (IFM,…)
-
for a INFO of level 2:
IF (NIV.EQ.2) WRITE (IFM,…).
Note:
One could think that the INFO of level 1 can be written without protecting itself by (IF
(NIV.GE.1)…) because these impressions start by defect. One will see with [§3] why it
is necessary the progéger.
To protect itself from the commands which do not have key word INFO in their catalog, it
supervisor updates the COMMON before each command:
Handbook of Descriptif Informatique
D6.04 booklet:
Index A
Code_Aster ®
Version
4
Titrate:
Impressions directed by key word INFO of the commands
Date:
02/05/1997
Authors:
J. PELLET
Key:
D6.04.02
Page: 3/4
CAL INFMAJ (1).
Handbook of Descriptif Informatique
D6.04 booklet:
Index A
Code_Aster ®
Version
4
Titrate:
Impressions directed by key word INFO of the commands
Date:
02/05/1997
Authors:
J. PELLET
Key:
D6.04.02
Page: 4/4
3
To protect itself from an excess of messages
The person in charge for a command is responsible for the impressions of level 1 of this command. He must
to document and arrange themselves so that the file message remains readable.
A problem arises when a command called upon a utility printing of the INFO of level 1 that
the person in charge for the command judges without interest (or too many… for example in a loop). It
is necessary to give to the command the means “of making conceal” the utility. For that, one has the 2 routines:
INFMUE () to return code “MUET” until new command,
INFBAV () to give the code in mode “BAVARD”.
These 2 routines are effective only if the level of impression required is 1: one cannot prevent it
code “speech” if INFO = 2.
Example:
Command OPOOOI does not want to only hear known as the routine B
SUBROUTINE
OPOOOI
CALL
INFMAJ
…
CALL
With (...)
…
CALL
INFMUE ()
CALL
B (...)
CALL
INFBAV ()
…
END
Note:
·
This system is not perfect because it only makes it possible to stop without understanding it
flood of the impressions. It does not allow for example, to prohibit B from speaking all in
leaving C (called by B) speech!
·
so that INFMUE/INFBAV is effective, it is necessary that the routines that one wants to make conceal
their impressions of level 1 programmed in the following way: IF (NIV.GE.1)
WRITE….
Handbook of Descriptif Informatique
D6.04 booklet:
Index A
Code_Aster ®
Version
4
Titrate:
Impressions directed by key word INFO of the commands
Date:
02/05/1997
Authors:
J. PELLET
Key:
D6.04.02
Page: 5/4
4
Operation of utilities INFXXX
The purpose of this paragraph is only to help to include/understand (if necessary) the use of these routines:
·
COMMON/INF001/NIVUTI, NIVPGM, UNIT
INTEGER
NIVUTI:
level requested by the user: 1 or 2
INTEGER
NIVPGM:
level accessible to the programmer: 0, 1, or 2
INTEGER
UNITE:
logical unit of file “MESSAGE”
·
COMMON INF001 is used only by routines INFXXX
·
SUBROUTINE INFMAJ ()
COMMON/INF001/…
GETVIS (nomCMD, “I”, “INFO”,…, NIV)
NIVUTI = NIV
NIVPGM = NIV
UNIT = IUNIFI (“MESSAGE”)
END
·
SUBROUTINE INFNIV (IFM, NIV)
COMMON/INF001/…
INF = UNIT
NIV = NIVPGM
END
·
SUBROUTINE INFMUE ()
COMMON/INF001/…
IF (NIVUTI.EQ.1) NIVPGM = 0
END
·
SUBROUTINE INFBAV ()
COMMON/INF001/…
NIVPGM = NIVUTI
END
Handbook of Descriptif Informatique
D6.04 booklet:
Index A