Using a File Extension to Specify Language
From InterBase
Go Up to Preprocessing
In addition to using a language switch to specify the host language, it is also possible to indicate the host language with the file-name extension of the source file. The following table lists the file-name extensions for each language that gpre supports and the default extension of the output file:
| Language | Input file extension | Default output file extension |
|---|---|---|
|
Ada ( |
ea |
a |
|
Ada (Alsys, Telesoft) |
eada |
ada |
|
C |
e |
c |
|
C++ |
exx |
cxx |
|
COBOL |
ecob |
cob |
|
FORTRAN |
ef |
f |
|
Pascal |
epas |
pas |
For example, to preprocess a COBOL program called census.ecob, type:
gpre census_report.ecob
This generates an output file called census.cob.
When specifying a file-name extension, it is possible to specify a language switch as well:
gpre -cob census.ecob