apl - a free APL interpreter

apl [options]

GNU APL is an interpreter for the programming language APL with support for nested arrays as defined in ISO standard 13751, aka. "Programming Language APL, Extended". This man page only describes the command line options of GNU APL; for a complete documentation of GNU APL see the info(1) file apl.info that is distributed with GNU APL.

Before explaining the command line options of GNU APL, it may be worthwile to mention how to stop (i.e. exit) it. Neither ^C nor ^D will stop GNU APL; these keys serve other purposes. Instead, you leave GNU APL with the command )OFF (on a separate line) like this:


If APL is computing an expression (and possibly caught in an endless loop), then you may have to press ^C (called ATTENTION in APL) in order to return to APL's command mode and then give the )OFF command.

GNU APL accepts the following command line options:

show ./configure options used and exit.
start with ]COLOR ON [OFF].
run the interpreter in the background (i.e. as daemon)
run in (old) emacs mode.
--emacs_arg arg
run in (new) emacs mode with argument arg.
-f file
read input from file rather than from the keyboard. When the end of the file is reached, input is switched back to the keyboard. If you want to terminate the APL interpreter after executing the file, then use )OFF as last line in the file.
show GNU APL license (GPL) and exit.
-h, --help
print all command line options with a brief hint what they do.
-L wsname
)LOAD wsname on start-up.
--LX expr
execute expr first (like ⎕LX)
--id proc
use processor ID proc for this interpreter. If no ID is provided, then the first unused ID > 1000 is taken by this interpreter and the ID becomes used as long as the interpreter runs. Processor IDs are used by shared variables to identify share partners.
-l num
turn logging facility num ON (if dynamic logging is configured). The logging facility for startup messages can be turned on even when dynamic logging is not configured.
copy the input line (after editing) to stdout. For creating session logs.
do not echo stdin to stdout. Almost a must for scripting (unless you troubleshoot a script).
do not load a CONTINUE workspace on start-up.
-p N
use profile N in preference files
do [not] start APserver (a shared variable server) on start-up. This disables communication with other workspaces or auxiliary processors through shared variables.
--par pproc
use processor parent ID pproc (default: no parent ID).
-s, --script
this option is an abbreviation for --silent --noCIN --noCONT -f - (a typical combination of options for APL scripts).
display the binary directory (where, according to ./configure,
display the directory where, according to ./configure, documentation files for GNU APL are intalled)
display the system configuration directory where, according to ./configure, the preferences file for GNU APL is intalled
display the system configuration directory where, according to ./configure, shared library files and the workspaces shipped with GNU APL are intalled.
display the source directory where, according to ./configure, GNU APL was compiled. This can be used, for example, by native functions that are built outside the GNU APL source tree to find GNU APL header files needed to compile.
display all the directories above.
-q, --silent
suppress printing of the GNU APL welcome message. Useful for APL scripts.
-T testcases ...
run testcases. Testcases are text files that contain both input to the APL interpreter and the expected response from the interpreter. The output from the interpreter is compared with the expected output in the testcase file(s) and differences are marked. In addition a summary file is created that tells whether or not each of the testcases was successful.
--TM mode
test mode. This option how the interpreter shall behave when running a number of testcases (as specified with the `-T' option)
--TM 0 (default)
run all testcases and exit after the last testcase.
--TM 1
like --TM 0 if no error was detected. However, if one of the testcases has failed, then the interpreter does not exit so that the user can investigate the state of APL (SI, variable values, etc.).
--TM 2
like --TM 1, but stay in the interpreter even if all testcases have passed. This can be useful in order to quickly bring the interpreter into a specific state and continue manual troubleshooting from that state.
--TM 3
like --TM 1, but stop testcase execution after the first failed testcase (i.e. do not exit).
--TM 4
like `--TM 3', but exit after the first failed testcase. The is useful for automatic regression tests, where no errors are expected.
execute test case files in random order.
Normally, when the interpreter is run with the `-T' option, then an existing summary.log file is overridden without notice. This option causes new test results to be appended to a possibly existing summary.log instead of overriding it.
-v, --version
show version information and exit.
-w milli
wait milli milliseconds at start-up. Useful to give other programs that are started together with this interpreter time to initialize themselves.
end of options for the interpreter. There can be more options following; these options are ignored by the APL interpreter, but are visible in the APL system variable ⎕ARG (which plays the role of arguments argc/argv in main(int argc, char * argv[]) in C/C++).

Report bugs to bug-apl@gnu.org


This manual page was written by Jürgen Sauermann, the author and maintainer of GNU APL.
2014 July 28 apl