.\" @(#)ioinit.3f 1.3 86/01/02 SMI; from UCB 4.2 .TH IOINIT 3F "07 July 1995" .SH NAME ioinit \- initialize I/O: carriage control, blanks, append, file names .SH SYNOPSIS .\" .IX ioinit ""\fLioinit\fP .IX initialize I/O .IX "carriage control" initialize .IX "trailing blanks, initialize" .IX embedded "blanks, initialize" .IX "append on open" .IX file "connection, automatic" .\" .B "logical function ioinit ( cctl, bzro, apnd, prefix, vrbose )" .br .B logical cctl, bzro, apnd, vrbose .br .B character*(*) prefix .SH DESCRIPTION This routine initializes several global parameters in the .B 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 .B ioinit is called. The exception is the preassigned units, 5 and 6, to which .B cctl and .B bzro apply at any time. .B ioinit is written in FORTRAN 77. .TP .B cctl .I "Carriage control" \-- By default, carriage control is not recognized on any logical unit. If .B cctl is .BR .true. , then carriage control is recognized on formatted output to all logical units except unit 0, the diagnostic channel. Otherwise, the default is restored. .TP .B bzro .I Blanks \-- By default, trailing and embedded blanks in input data fields are ignored. If .B bzro is .BR .true. , then such blanks are treated as zeros. Otherwise, the default is restored. .TP .B apnd .I Append \-- By default, all files opened for sequential access are positioned at their beginning. It is sometimes necessary or convenient to open at END-OF-FILE, so that a write appends to the existing data. If .B apnd is .BR .true. , then files opened subsequently on any logical unit are positioned at their end upon opening. A value of .B .false. restores the default behavior. .TP .BR prefix : .I "Automatic file connection" \-- 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 this FORTRAN compiler. However, if the argument .B prefix is a non-blank string, then names of the form .BI prefix NN are sought in the program environment. The value associated with each such name found are used to open the logical unit .I NN for formatted sequential access. .sp .2 For example, if the program .B myprogram has the call: .nf .sp .2 .B "call ioinit ( .true., .false., .false., \(fmFORT\(fm, .false.)" .sp .2 .fi then the following sequence: .bp .sp .2 .nf .ft 3 % setenv FORT01 mydata % setenv FORT12 myresults % myprogram .ft 1 .fi .sp .2 results in logical unit 1 opened to the file .BR mydata , and logical unit 12 opened to the file .BR myresults . Both files would be positioned at their beginning. Any formatted output would have column 1 removed and interpreted as carriage control. Embedded and trailing blanks are ignored on input. .TP .BR vrbose : .I "IOINIT activity" \-- If the argument .B vrbose is .BR .true. , then .B ioinit reports on its activity. .PP The internal flags are stored in a labeled common block with the following definition: .sp .2 .nf .ft 3 integer*2 ieof, ictl, ibzr common /__ioiflg/ ieof, ictl, ibzr .ft 1 .fi .SH FILES .B libF77.a .SH "SEE ALSO" .BR getarg (3F), .BR getenv (3F) .SH BUGS .I prefix cannot be longer than 30 characters. A path name associated with an environment name cannot be longer than 255 characters. .PP The .B + carriage control does not work.