|
|
1.1 root 1: .\" Copyright (c) 1983 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)ioinit.3f 6.3 (Berkeley) 5/27/86
6: .\"
7: .TH IOINIT 3F "May 27, 1986"
8: .UC 5
9: .SH NAME
10: ioinit \- change f77 I/O initialization
11: .SH SYNOPSIS
12: \fBlogical function ioinit (cctl, bzro, apnd, prefix, vrbose)\fP
13: .br
14: .B logical cctl, bzro, apnd, vrbose
15: .br
16: .B character*(*) prefix
17: .SH DESCRIPTION
18: This routine will initialize several global parameters in the f77 I/O system,
19: and attach externally defined files to logical units at run time.
20: The effect of the flag arguments applies to logical units opened after
21: .I ioinit
22: is called.
23: The exception is the preassigned units, 5 and 6, to which
24: .I cctl
25: and
26: .I bzro
27: will apply at any time.
28: .I Ioinit
29: is written in Fortran-77.
30: .PP
31: By default,
32: carriage control is not recognized on any logical unit. If
33: .I cctl
34: is
35: .B .true.
36: then carriage control will be recognized on formatted output
37: to all logical units except unit 0, the diagnostic channel.
38: Otherwise the default will be restored.
39: .PP
40: By default, trailing and embedded blanks in input data fields
41: are ignored. If
42: .I bzro
43: is
44: .B .true.
45: then such blanks will be treated as zeros.
46: Otherwise the default will be restored.
47: .PP
48: By default, all files opened for sequential access are positioned at
49: their beginning.
50: It is sometimes necessary or convenient to open at the END-OF-FILE
51: so that a write will append to the existing data.
52: If
53: .I apnd
54: is
55: .B .true.
56: then files opened subsequently on any logical unit
57: will be positioned at their end upon opening.
58: A value of
59: .B .false.
60: will restore the default behavior.
61: .PP
62: .I Ioinit
63: may be used to associate file names with Fortran logical unit numbers
64: through environment variables
65: (see "Introduction to the f77 I/O Library" for a more general way of
66: doing this).
67: If the argument
68: .I prefix
69: is a non-blank string, then names of the form
70: .BR prefix NN
71: will be sought in the program environment. The value associated with
72: each such name found will be used to open logical unit NN for formatted
73: sequential access.
74: For example, if f77 program
75: .I myprogram
76: included the call
77: .nf
78:
79: call ioinit (.true., .false., .false., \(fmFORT\(fm, .false.)
80:
81: .fi
82: then when the following sequence
83: .nf
84:
85: % setenv FORT01 mydata
86: % setenv FORT12 myresults
87: % myprogram
88:
89: .fi
90: would result in logical unit 1 opened to file
91: .I mydata
92: and logical unit 12 opened to file
93: .IR myresults .
94: Both files would be positioned at their beginning.
95: Any formatted output would have column 1 removed and interpreted
96: as carriage control.
97: Embedded and trailing blanks would be ignored on input.
98: .PP
99: If the argument
100: .I vrbose
101: is
102: .B .true.
103: then
104: .I ioinit
105: will report on its activity.
106: .PP
107: The effect of
108: .nf
109:
110: call ioinit (.true., .true., .false., \(fm\(fm, .false.)
111:
112: .fi
113: can be achieved without the actual call by including ``\-lI66''
114: on the
115: .I f77
116: command line.
117: This gives carriage control on all logical units except 0,
118: causes files to be opened at their beginning, and causes
119: blanks to be interpreted as zero's.
120: .PP
121: The internal flags are stored in a labeled common block with the following
122: definition:
123: .nf
124:
125: integer*2 ieof, ictl, ibzr
126: common /ioiflg/ ieof, ictl, ibzr
127:
128: .fi
129: .SH FILES
130: .ta \w'/usr/ucb/lib/libI77.a 'u
131: .ie \nM /usr/ucb/lib/libI77.a f77 I/O library
132: .el /usr/lib/libI77.a f77 I/O library
133: .br
134: .ie \nM /usr/ucb/lib/libI66.a sets older fortran I/O modes
135: .el /usr/lib/libI66.a sets older fortran I/O modes
136: .SH "SEE ALSO"
137: getarg(3F), getenv(3F), ``Introduction to the f77 I/O Library''
138: .SH BUGS
139: .I Prefix
140: can be no longer than 30 characters.
141: A pathname associated with an environment name can be no longer than 255
142: characters.
143: .PP
144: The ``+'' carriage control does not work.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.