Research V4 development
[unix-history] / man / man1 / fc.1
CommitLineData
db2a4623
DR
1.th FC I 8/20/73
2.sh NAME
3fc \*- fortran compiler
4.sh SYNOPSIS
5.bd fc
6[
7.bd \*-c
8] sfile1.f ... ofile1 ...
9.sh DESCRIPTION
10.it Fc
11is the UNIX Fortran compiler.
12It accepts three types of arguments:
13.s3
14Arguments whose names end with `.f' are assumed to be
15Fortran source program units; they are compiled, and
16the object program is left on the file sfile1.o (i.e.
17the file whose name is that of the source with `.o' substituted
18for `.f').
19.s3
20Other arguments (except for
21\fB\*-c\fR)
22are assumed
23to be either loader flags, or
24object programs, typically produced by an earlier
25.it fc
26run,
27or perhaps libraries of Fortran-compatible routines.
28These programs, together with the results of any
29compilations specified, are loaded (in the order
30given) to produce an executable program with name
31.bd a.out.
32.s3
33The
34.bd \*-c
35argument suppresses the loading phase, as does
36any syntax error in any of the routines being compiled.
37.s3
38The following is a list
39of differences between
40.it fc
41and ANSI standard Fortran (also see the BUGS section):
42.s3
43.lp +4 4
441. Arbitrary combination of types is allowed
45in expressions. Not all combinations are expected to
46be supported at runtime.
47All of the normal
48conversions involving integer, real, double
49precision and complex are allowed.
50.s3
51.lp +4 4
522. DEC's \fBimplicit\fR statement is recognized.
53E.g.:
54.bd "implicit integer /i\*-n/".
55.s3
56.lp +4 4
573. The types
58doublecomplex, logical*1,
59integer*1, integer*2 and real*8 (double precision)
60are supported.
61.s3
62.lp +4 4
634. \fB&\fR as the first character of a line
64signals a continuation card.
65.s3
66.lp +4 4
675. \fBc\fR as the first character of a line signals a comment.
68.s3
69.lp +4 4
706. All keywords are recognized in lower case.
71.s3
72.lp +4 4
737. The notion of `column 7' is not implemented.
74.s3
75.lp +4 4
768. G-format input is free form\*-
77leading blanks are ignored, the first blank after the start
78of the number terminates the field.
79.s3
80.lp +4 4
819. A comma in any numeric or logical input field terminates
82the field.
83.s3
84.lp +4 4
8510. There is no carriage control on output.
86.s3
87.lp +4 4
8811. A sequence of
89.it n
90characters in double quotes `"' is equivalent to
91.it n
92.bd h
93followed by those characters.
94.s3
95.lp +4 4
9612. In
97.bd data
98statements, a hollerith string may initialize an array
99or a sequence of array elements.
100.s3
101.lp +4 4
10213. The number of storage units requested by a binary
103.bd read
104must be identical to the number contained
105in the record being read.
106.s3
107.i0
108In I/O statements, only unit numbers 0-19 are supported.
109Unit number
110.it n
111refers to file
112fort\fInn;\fR
113(e.g. unit 9 is file `fort09').
114For input, the file must exist;
115for output, it will be created.
116Unit 5 is permanently associated with
117the standard input file; unit 6 with the
118standard output file.
119Also see
120.it setfil
121(III)
122for a way to associate unit numbers with named files.
123.sh FILES
124.ta 1.5i
125file.f input file
126.nf
127a.out loaded output
128f.tmp[123] temporary (deleted)
129/usr/fort/fc1 compiler proper
130/lib/fr0.o runtime startoff
131/lib/filib.a interpreter library
132/lib/libf.a builtin functions, etc.
133/lib/liba.a system library
134.fi
135.sh "SEE ALSO"
136ANSI standard,
137ld(I) for loader flags
138.br
139Also see the writeups on the precious few
140non-standard Fortran subroutines,
141ierror and setfil (III)
142.sh DIAGNOSTICS
143Compile-time diagnostics are given in English,
144accompanied if possible with the offending
145line number and source line with an underscore where the error
146occurred.
147Runtime diagnostics
148are given by number as follows:
149.s3
150.lp +5 5
1511 invalid log argument
152.lp +5 5
1532 bad arg count to amod
154.lp +5 5
1553 bad arg count to atan2
156.lp +5 5
1574 excessive argument to cabs
158.lp +5 5
1595 exp too large in cexp
160.lp +5 5
1616 bad arg count to cmplx
162.lp +5 5
1637 bad arg count to dim
164.lp +5 5
1658 excessive argument to exp
166.lp +5 5
1679 bad arg count to idim
168.lp +5 5
16910 bad arg count to isign
170.lp +5 5
17111 bad arg count to mod
172.lp +5 5
17312 bad arg count to sign
174.lp +5 5
17513 illegal argument to sqrt
176.lp +5 5
17714 assigned/computed goto out of range
178.lp +5 5
17915 subscript out of range
180.lp +5 5
18116 real**real overflow
182.lp +5 5
18317 (negative real)**real
184.s3
185.lp +5 5
186100 illegal I/O unit number
187.lp +5 5
188101 inconsistent use of I/O unit
189.lp +5 5
190102 cannot create output file
191.lp +5 5
192103 cannot open input file
193.lp +5 5
194104 EOF on input file
195.lp +5 5
196105 illegal character in format
197.lp +5 5
198106 format does not begin with (
199.lp +5 5
200107 no conversion in format but non-empty list
201.lp +5 5
202108 excessive parenthesis depth in format
203.lp +5 5
204109 illegal format specification
205.lp +5 5
206110 illegal character in input field
207.lp +5 5
208111 end of format in hollerith specification
209.lp +5 5
210999 unimplemented input conversion
211.i0
212Any of these errors can be caught by the program;
213see
214.it ierror
215(III).
216.sh BUGS
217The following is a list of
218those features not yet implemented:
219.s3
220.br
221arithmetic statement functions
222.br
223scale factors on input
224.s3
225.bd Backspace
226statement.