Research V3 development
[unix-history] / man / man1 / fc.1
CommitLineData
39fcfcc8
DR
1.pa 1
2.he 'FC (I)'9/1/72'FC (I)'
3.ti 0
4NAME fc -- fortran compiler
5.sp
6.ti 0
7SYNOPSIS fc\b\b__ [ -c\b\b__ ] sfile\d1\u.f\b\b__ ... ofile\d1\u ...
8.sp
9.ti 0
10DESCRIPTION fc\b\b__
11is the UNIX Fortran compiler.
12It accepts three types of arguments:
13
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 sfile\d1\u.o (i.e.
17the file whose name is that of the source with ".o" substituted
18for ".f").
19
20Other arguments (except for "-c") are assumed
21to be either loader flags, or
22object programs, typically produced by an earlier fc\b\b__ run,
23or perhaps libraries of Fortran-compatible routines.
24These programs, together with the results of any
25compilations specified, are loaded (in the order
26given) to produce an executable program with name
27a.out\b\b\b\b\b_____.
28
29The "-c" argument suppresses the loading phase, as does
30any syntax error in any of the routines being compiled.
31
32The following is a list
33of differences between fc\b\b__
34and ANSI standard Fortran (also see the BUGS section):
35.sp
36.in +3
37.ti -3
381. Arbitrary combination of types is allowed
39in expressions. Not all combinations are expected to
40be supported at runtime.
41All of the normal
42conversions involving integer, real, double
43precision and complex are allowed.
44.sp
45.ti -3
462. The 'standard' implicit statement is recognized.
47.sp
48.ti -3
493. The types
50doublecomplex, logical*1,
51integer*2 and real*8 (doubleprecision)
52are supported.
53.sp
54.ti -3
554. &\b_ as the first character of a line
56signals a continuation card.
57.sp
58.ti -3
595. c\b_ as the first character of a line signals a comment.
60.sp
61.ti -3
626. All keywords are recognized in lower case.
63.sp
64.ti -3
657. The notion of 'column 7' is not implemented.
66
67.ti -3
688. G-format input is free form--
69leading blanks are ignored, the first blank after the start
70of the number terminates the field.
71
72.ti -3
739. A comma in any numeric or logical input field terminates
74the field.
75
76.ti -4
7710. There is no carriage control on output.
78.sp
79.in -3
80In I/O statements, only unit numbers 0-19 are supported.
81Unit number nn\b\b__ corresponds to file "fortnn\b\b__;"
82(e.g. unit 9 is file "fort09").
83For input, the file must exist;
84for output, it will be created.
85
86Unit 5 is permanently associated with
87the standard input file; unit 6 with the
88standard output file.
89.sp
90.ti 0
91FILES file.f input file
92.nf
93a.out loaded output
94f.tmp[123] temporary (deleted)
95/usr/fort/fc[1234] compilation phases
96/usr/lib/fr0.o runtime startoff
97/usr/lib/filib.a interpreter library
98/usr/lib/libf.a builtin functions, etc.
99/usr/lib/liba.a system library
100.fi
101.sp
102.ti 0
103SEE ALSO ANSI standard
104.sp
105.ti 0
106DIAGNOSTICS Compile-time diagnostics
107are given by number.
108If the source code is available, it is
109printed with an underline at the current
110character pointer.
111Errors possible are:
112
113.in +8
114.ti -8
1151 statement too long
116.ti -8
1172 syntax error in type statement
118.ti -8
1193 redeclaration
120.ti -8
1214 missing ( in array declarator
122.ti -8
1235 syntax error in dimension statement
124.ti -8
1256 inappropriate or gratuitous array declarator
126.ti -8
1277 syntax error in subscript bound
128.ti -8
1298 illegal character
130.ti -8
1319 common variable is a parameter or already in common
132.ti -8
13310 common syntax error
134.ti -8
13511 subroutine/blockdata/function not first statement
136.ti -8
13712 subroutine/function syntax error
138.ti -8
13913 block data syntax error
140.ti -8
14114 redeclaration in external
142.ti -8
14315 external syntax error
144.ti -8
14516 implicit syntax error
146.ti -8
14717 subscript on non-array
148.ti -8
14918 incorrect subscript count
150.ti -8
15119 subscript out of range
152.ti -8
15320 subscript syntax error
154.ti -8
15522 DATA syntax error
156.ti -8
15723 Illegal variable in DATA
158.ti -8
15923 equivalence inconsistency
160.ti -8
16124 equivalence syntax error
162.ti -8
16325 separate common blocks equivalenced
164.ti -8
16526 common block illegally extended by equivalence
166.ti -8
16727 common inconsistency created by equivalence
168.ti -8
16928 DATA table overflow
170.ti -8
17129 () imbalance in expression
172.ti -8
17330 expression syntax error
174.ti -8
17531 illegal variable in equivalence
176.ti -8
17732 Storage initialized twice by DATA
178.ti -8
17933 non array/function used with subscripts/arguments
180.ti -8
18135 goto syntax error
182.ti -8
18337 illegal return
184.ti -8
18538 continue, return, stop, call, end, or pause syntax error
186.ti -8
18739 assign syntax error
188.ti -8
18940 if syntax error
190.ti -8
19141 I/O syntax error
192.ti -8
19342 do or I/O iteration error
194.ti -8
19543 do end missing
196.ti -8
19750 illegal statement in block data
198.ti -8
19951 multiply defined labels
200.ti -8
20152 undefined label
202.ti -8
20353 dimension mismatch
204.ti -8
20554 expression syntax error
206.ti -8
20755 end of statement in hollerith constant
208.ti -8
20956 array too large
210.ti -8
21199 \ eB\ f table overflow
212.ti -8
213101 unrecognized statement
214.ti -8
215
216.ti -8
217Runtime diagnostics:
218.ti -8
219
220.ti -8
2211 invalid log argument
222.ti -8
2232 bad arg count to amod
224.ti -8
2253 bad arg count to atan2
226.ti -8
2274 excessive argument to cabs
228.ti -8
2295 exp too large in cexp
230.ti -8
2316 bad arg count to cmplx
232.ti -8
2337 bad arg count to dim
234.ti -8
2358 excessive argument to exp
236.ti -8
2379 bad arg count to idim
238.ti -8
23910 bad arg count to isign
240.ti -8
24111 bad arg count to mod
242.ti -8
24312 bad arg count to sign
244.ti -8
24513 illegal argument to sqrt
246.ti -8
24714 assigned/computed goto out of range
248.ti -8
24915 subscript out of range
250.ti -8
25116 real**real overflow
252
253.ti -8
254100 illegal I/O unit number
255.ti -8
256101 inconsistent use of I/O unit
257.ti -8
258102 cannot create output file
259.ti -8
260103 cannot open input file
261.ti -8
262104 EOF on input file
263.ti -8
264105 illegal character in format
265.ti -8
266106 format does not begin with (
267.ti -8
268107 no conversion in format but non-empty list
269.ti -8
270108 excessive parenthesis depth in format
271.ti -8
272109 illegal format specification
273.ti -8
274110 illegal character in input field
275.ti -8
276111 end of format in hollerith specification
277.ti -8
278999 unimplemented input conversion
279.sp
280.in -8
281.ti 0
282BUGS The following is a list of
283those features not yet implemented:
284.sp
285.br
286arithmetic statement functions
287
288backspace, endfile, rewind runtime
289
290binary I/O
291
292no scale factors on input