Next: 2 Function interpreter
Up: 1 Free format
Prev: 1.1 Utilization
Index
Contents
A program can read a scalar, an array, or initiate a command.
There are several utilities at the programmer's disposal, depending on the type of input data. These utilities are described in figure 1.1.
Figure 1.1: The free format utilities
For example, the instruction:
CALL LIBENT(N)
reads the integer, N, in free format.
In order to read an array, it suffices to perform a loop. An array of 10 reals is read in the example below:
REAL T(10)...
DO 100 I = 1, 10
CALL LIBRSP(T(I))
100 CONTINUE
Instead of activating commands via the input data
(section 1.1.5),
it is possible to activate them using a program, by means of utility
LIBSET.
( Utility LIBCOM, corresponding to the old commands,
is not documented here.)
The notation used for the utilities below |
is the usual notation (see Appendix A). |
SUBROUTINE LIBSET(,
,
)
CHARACTER*(*) COM
INTEGER N, ICODE
This utility activates a command, COM, which has a numeric argument N (if it exists). The list of commands available is found in section 1.1.5. On exit, ICODE=0 if no error occurred.
For example:
C COMMANDS WITHOUT NUMERIC ARGUMENT:
CALL LIBSET('ADRESSAGE', 0, ICODE) !ADRESSAGE
CALL LIBSET('ECRIRE *', 0, ICODE) !ECRIRE *
C COMMAND WITH NUMERIC ARGUMENT:
CALL LIBSET('BAVARDAGE', 5, ICODE) !BAVARDAGE 5