Language Switch and No Input File Extension

From InterBase
Jump to: navigation, search

Go Up to Specifying the Source File


If gpre encounters a language switch, but the specified input file has no extension, it does the following:

  1. It looks for the input file without an extension. If gpre finds the file, it processes it and generates an output file with the appropriate extension. If gpre does not find the input file, it looks for the file with the extension that corresponds to the indicated language. If it finds such a file, it generates an output file with the appropriate extension.
  2. If gpre cannot find either the named file or the named file with the appropriate extension, it returns the following error:
    gpre: can’t open filename or filename.extension
    

    <filename> is the file specified in the gpre command. <extension> is the language-specific file extension for the specified program.

An Example:

Suppose the following command is issued:

gpre -c census

gpre performs the following sequence of actions:

  1. It looks for a file called census without an extension. If it finds the file, it processes it and generates census.c.
  2. If it cannot find census, it looks for a file called census.e. If it finds census.e, it processes the file and generates census.c.
  3. If it cannot find census or census.e, it returns this error:
gpre: can’t open census or census.e