Using a File Extension to Specify Language

From InterBase
Jump to: navigation, search

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:

File extensions for language specification
Language Input file extension Default output file extension

Ada (VERDIX)

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

Advance To: