Man Page ioinit.3f




NAME

     ioinit - initialize I/O: carriage control,  blanks,  append,
     file names


SYNOPSIS

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


DESCRIPTION

     This routine initializes several global  parameters  in  the
     f77  I/O  system,  and  attaches externally defined files to
     logical units at runtime.  This connection exists only until
     broken;  if  you  close  the  unit,  then  the connection no
     longers holds.  The effect of the flag arguments applies  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.

     cctl Carriage control -- By default, carriage control is not
          recognized on any logical unit. If cctl is .true., then
          carriage control is recognized on formatted  output  to
          all  logical  units except unit 0, the diagnostic chan-
          nel.  Otherwise, the default is restored.

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

     apnd Append -- By default, all files opened  for  sequential
          access  are positioned at their beginning.  It is some-
          times necessary or convenient to open  at  END-OF-FILE,
          so  that a write appends to the existing data.  If apnd
          is .true., then files opened subsequently on any  logi-
          cal  unit  are positioned at their end upon opening.  A
          value of .false. restores the default behavior.

     prefix:
          Automatic file connection -- Many  systems  provide  an
          automatic association of global names with FORTRAN log-
          ical units when a program is run.   There  is  no  such
          automatic  association  in this FORTRAN compiler.  How-
          ever, if the argument prefix  is  a  non-blank  string,
          then  names of the form prefixNN are sought in the pro-
          gram environment.  The value associated with each  such
          name  found  are  used  to open the logical unit NN for
          formatted sequential access.
          For example, if the program myprogram has the call:
          call ioinit ( .true., .false., .false., 'FORT', .false.)
          then the following sequence:

                % setenv FORT01 mydata
                % setenv FORT12 myresults
                % myprogram
          results in logical unit 1 opened to  the  file  mydata,
          and logical unit 12 opened to the file myresults.  Both
          files would be positioned at their beginning.  Any for-
          matted  output  would  have column 1 removed and inter-
          preted as  carriage  control.   Embedded  and  trailing
          blanks are ignored on input.

     vrbose:
          IOINIT activity -- If the argument  vrbose  is  .true.,
          then ioinit reports on its activity.

     The internal flags are stored in a labeled common block with
     the following definition:
          integer*2 ieof, ictl, ibzr
          common /__ioiflg/ ieof, ictl, ibzr


FILES

     libF77.a


SEE ALSO

     getarg(3F), getenv(3F)


BUGS

     prefix cannot be longer than 30  characters.   A  path  name
     associated  with  an  environment name cannot be longer than
     255 characters.

     The + carriage control does not work.