Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getarg(3f)

getenv(3f)



IOINIT(3F)              COMMAND REFERENCE              IOINIT(3F)



NAME
     ioinit - change f77 I/O initialization

SYNOPSIS
     logical function ioinit (cctl, bzro, apnd, prefix, vrbose)
     logical cctl, bzro, apnd, vrbose
     character*(*) prefix

DESCRIPTION
     This routine will initialize several global parameters in
     the f77 I/O system, and attaches externally defined files to
     logical units at run time.  The effect of the flag arguments
     applies only to logical units opened after ioinit is called.
     The exception is the preassigned units, 5 and 6, to which
     cctl and bzro apply at any time.  Ioinit is written in
     Fortran-77.

     By default, carriage control is not recognized on any
     logical unit. If cctl is .true. then carriage control will
     be recognized on formatted output to all logical units
     except unit 0 (stderr), the diagnostic channel.  Otherwise
     the default will be restored.

     By default, trailing and embedded blanks in input data
     fields are ignored.  If bzro is .true. then such blanks will
     be treated as zeros.  Otherwise, the default will be
     restored.

     By default, all files opened for sequential access are
     positioned at their beginning.  It is sometimes necessary or
     convenient to open at the end-of-file so that a write will
     append to the existing data.  If apnd is .true. then files
     opened subsequently on any logical unit will be positioned
     at their end upon opening.  A value of .false. will restore
     the default behavior.

     Many systems provide an automatic association of global
     names with FORTRAN logical units when a program is run.
     There is no such automatic association in f77.  However, if
     the argument prefix is a nonblank string, then names of the
     form prefixNN will be sought in the program environment.
     The value associated with each such name found will be used
     to open logical unit NN for formatted sequential access.
     See the first example below.

     If the argument vrbose is .true. then ioinit will report on
     its activity.

     The internal flags are stored in a labeled common block with
     the following definition:





Printed 5/12/88                                                 1





IOINIT(3F)              COMMAND REFERENCE              IOINIT(3F)



          INTEGER*2 ieof, ictl, ibzr
          COMMON /ioiflg/ ieof, ictl, ibzr

EXAMPLES
     Proper usage of the prefix parameter is shown in the
     following subprogram call within the f77 program myprogram:

          CALL ioinit (.true., .false., .false., 'FORT', .false.)

     Executing the following sequence

          % setenv FORT01 mydata
          % setenv FORT12 myresults
          % myprogram

     would result in logical unit 1, opened to file mydata and
     logical unit 12, opened to file myresults.  Any formatted
     output would have column 1 removed and interpreted as
     carriage control as indicated by the first parameter cctl
     set to .true..  Embedded and trailing blanks would be
     ignored on input (second parameter bzro set to .false.).
     Both files would be positioned at their beginning (third
     parameter apnd set to .false.).

     The effect of

          CALL ioinit (.true., .true., .false., '', .false.)

     can be achieved without the actual call by including -lI66
     on the f77 command line.  This gives carriage control on all
     logical units except 0, causes files to be opened at their
     beginning, and causes blanks to be interpreted as zeros.

FILES
     /usr/lib/libF77.a
                    f77 intrinsic and startup library.

     /usr/lib/libI66.a
                    Sets older FORTRAN I/O modes.

RETURN VALUE
     The value of ioinit will be .true.  unless some error
     occurred.

CAVEATS
     Prefix can be no longer than 30 characters.  A pathname
     associated with an environment name can be no longer than
     255 characters.

     The + carriage control character does not work.





Printed 5/12/88                                                 2





IOINIT(3F)              COMMAND REFERENCE              IOINIT(3F)



SEE ALSO
     getarg(3f) and getenv(3f).





















































Printed 5/12/88                                                 3



%%index%%
na:312,90;
sy:402,1198;
de:1600,2822;4806,81;
ex:4887,1685;
fi:6572,291;
rv:6863,318;
ca:7181,301;
se:7866,193;
%%index%%000000000145

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026