The APL Compiler, Command-Line Syntax

Aplc.exe is a stand-alone Windows-based 32-bit console application. You can run the compiler from the MS-DOS prompt running with Windows 95 or Windows NT but not on a pure MS-DOS or OEM version MS-DOS machine.

The Aplc.exe converts APL source code into adventure binaries (.adv files). The compiler takes an ASCII text file as input and generates a binary output file.

Syntax

APLC <options> <name1> [<name2>]

Parameter Description
options If you use -e for options, it specifies that any errors are written to a file instead of to standard error. If any errors occur, the error messages are written to an error file. The error file is created by taking the effective path name of the output (.adv) file and replacing the extension with .err. If no errors are encountered, any existing error file is deleted; so, the program that launches Aplc.exe can use the existence of the error file as a test for successful compilation.
If you use–p for options, it specifies that the input file is preprocessed. C preprocessing is performed by the Microsoft C++ compiler (CL) using the /E option. Preprocessed output is redirected to a file called C_Prepro.apl. If compilation is successful, this file is deleted before the APLC compilation is complete. Because the standard C preprocessor is used, any preprocessor directives that make sense in the context of APL can be used (such as #include, #define, #if, #ifdef, and so on).
If you use–q for options, it suppresses output of the copyright banner.
name1 Specifies the name of the input text file, with a .txt extension assumed if no extension is specified. Name1 can also be a minus sign (-) used to indicate that the input is taken from standard input rather than from a text file, in which case Name2 must be specified.
name2 Optional. Specifies the name of the output file. If Name2 isn't specified, Name1 is used; any extension given with Name2 is removed, and .adv is appended (adventure binaries always have an .adv extension).

If the compilation is successful, the exit status (DOS ERRORLEVEL) is 0. If any errors are detected during the compilation, appropriate error messages are written to a standard error or to the error file, the output (.adv) file is deleted, and the exit status is 1.