#COMPILE metastatement 

Purpose

Determine what type of file will be created by the compiler.

Syntax

#COMPILE EXE ["filename{.exe}"]

Remarks

This metastatement specifies the type of file the compiler should produce.  PB/CC can only generate EXE applications at this time.  The #COMPILE metastatement can only be used once per program, and must be placed before any executable code.

You may, optionally, specify the target name and directory of the file.  If this clause is omitted, the compiled file is given the name of the main source code file with an .EXE extension.

If a path is included, the compiled file is placed in the named directory; otherwise, it is placed in the current directory.

If the named directory does not exist, the filename is invalid or locked, if the EXE is still running, or if the file cannot be successfully stored in that location for some other reason, a compile-time Error 496 ("Destination file write error") occurs.

Restrictions

If #COMPILE is not specified in the module, the default is #COMPILE EXE.

See Also

#COMPILER, PBMAIN, WINMAIN