APL(1) — UNIX Programmer’s Manual
NAME
apl − an apl interpreter
SYNOPSIS
apl
DESCRIPTION
Apl is an APL interpreter. All operators are identical to those in apl\360. Overstrikes are often required, and are enabled by using ctrl-h.
Function definition differs from conventional usage. Functions are loaded from files. The first line of the file is the function header, as standard, with no del. The rest of the file consists of lines that describe the function. Lines are numbered, without square brackets. If )READ FILE is entered it loads the function in that file. If )EX FILE is entered, it selects editor to enable changing that file. Upon exit, )EX FILE reads the file in as though by )READ.
All of the usual operators, including domino, are available, as well as, monadic encode and epsilon.
The following apl system commands are available.
)ASCII
changes terminal to accept and print ASCII characters and operators; this is the default. If stuck in APL mode on an ASCII terminal, ‘"’ is ‘)’ and lowercase letters map to uppercase.
)APL
changes terminal to accept and print APL characters. Erase is set to Ω and kill is set to α.
)DIGITS n
sets the number of digits displayed to n, from 1 to 19.
)FUZZ n
sets the fuzz to n.
)ORIGIN n
sets the origin to n, which should be 1 or 0.
)WIDTH n
sets apl’s interpretation of the terminal’s carriage width.
)ERASE n
eliminates functions or variables named n.
)SAVE n
saves all variables and functions (workspace) in file a named n. Workspaces are sensitive to changes in apl.
)LOAD n
fetches the workspace in file n, which must have been previously )SAVE’d.
)COPY n
similar to )LOAD but variables and functions are not erased. Data in the loaded file take precedence over data in memory.
)CLEAR
clears the workspace.
)DROP n
deletes file n in the directory, which need not be saved from apl.
)CONTINUE
exits and saves workspace in file continue, which is loaded next time apl is run.
)OFF
exits apl.
)READ n
reads in a function from file n. The first line is the header, with no del’s. The full APL360 header is accepted. All other lines in the file are those in the function. Lines are implicitly numbered, and transfers are as standard. There are no labels.
)EDIT n
runs the editor ed(1) on file n, and then )READ’s the file when you leave the editor.
)EX n
runs the editor ex(1) on file n, and then )READ’s the file when you leave the editor.
)VI n
runs the editor vi(1) on file n, and then )READ’s the file when you leave the editor.
)LIB
lists out all of the files in the current directory.
)FNS
lists out all current functions.
)VARS
lists out all current variables.
)DEBUG
toggles a debugging switch, which can produce vast amounts of hopelessly cryptic output.
FILES
apl_ws − temporary workspace file
continue − continue workspace
AUTHORS
Ken Thompson, Ross Harvey, Douglas Lanam
BUGS
This program has not been extensively used or tested.
ASCII CHAR MNEMONICS
&Λand #×times
−−minus++add
<<less than>>greater than
==equal to,,comma
%÷divide\(**\(**exponential (power)
!!factorial and combinations??deal
.le≤less than or equal.ge≥greater than or equal
.ne≠not equal.omΩomega (not used)
.epεepsilon.rhρshape (rho)
.nt¬not (also ´~´).tk↑take (also ´^´)
.dr↓drop.itιiota
.ci○circular function.alαalpha (not used)
.cl⌈maximum (ceiling).fl⌊minimum (floor)
.dlΔdel (not used).de∇upside down del
.jt°small circle (null).qd□quad
.ss⊂right U (not used).scleft U (not used)
.si∩Down U.su∪U (not used)
.[^∇upside-down del.bv⌊
⌋decode (base)
.rp⌈
⌉encode (rep).br|residue (mod)
.sp←assignment (also ’_’).go→goto
.orVor.nnΛ
~nand
.nrv
~nor.lg\(**
○log
.rv○
|reversal.tr○
\transpose
.rbreverse bar.cb,
-comma bar ( not used)
.sb/
-slash bar.bb\
-blackslash bar
.guΔ
|grade up.gd∇
|grade down
.qq□
′quote quad.dm□
:domino
.lm∩
°lamp.ib⌉
⌈
⌊
⌋I-beam
.exexecute (not used).frformat(not used)
.didiamond (not used).otout (not used)
.ldΔ
~locked del (not used)._aAalias for ´A´
._bBalias for ´B´._cCalias for ´C´
._dDalias for ´D´._eEalias for ´E´
._fFalias for ´F´._gGalias for ´G´
._hHalias for ´H´._iIalias for ´I´
._jJalias for ´J´._kKalias for ´K´
._lLalias for ´L´._mMalias for ´M´
._nNalias for ´N´._oOalias for ´O´
._pPalias for ´P´._qQalias for ´Q´
._rRalias for ´R´._sSalias for ´S´
._tTalias for ´T´._uUalias for ´U´
._vValias for ´V´._wWalias for ´W´
._xXalias for ´X´._yYalias for ´Y´
._zZalias for ´Z´
4th Berkeley Distribution — @(#)apl.11.1Preliminary ERN0