If the argument vrbose is .TRUE., then IOINIT reports on its own activity.
Example: The program myprogram has the following ioinit call:
call ioinit( .true., .false., .false., 'FORT', .false.)
You can assign file name in at least two ways.
demo$ FORT01=mydata demo$ FORT12=myresults demo$ export FORT01 FORT12 demo$ myprogram
demo% setenv FORT01 mydata demo% setenv FORT12 myresults demo% myprogram
With either shell, the ioinit call in the above example gives these results:
Open logical unit 1 to the file, mydata.
Open logical unit 12 to the file, myresults.
Both files are positioned at their beginning.
Any formatted output has column 1 removed and interpreted as carriage control.
Embedded and trailing blanks are to be ignored on input.
Example: ioinit()--list and compile:
demo% cat tioinit.f character*3 s call ioinit( .true., .false., .false., 'FORT', .false.) do i = 1, 2 read( 1, '(a3,i4)') s, n write( 12, 10 ) s, n end do 10 format(a3,i4) end demo% cat tioinit.data abc 123 PDQ 789 demo% f77 -silent tioinit.f demo%
You can set environment variables as follows, using either sh or csh:
demo$ FORT01=tioinit.data demo$ FORT12=tioinit.au demo$ export FORT01 FORT12 demo$
demo% a.out demo% cat tioinit.au abc 123 PDQ 789
demo% a.out demo% cat tioinit.au abc 123 PDQ 789