User Tools

Site Tools


apl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
apl [2021/11/04 11:14]
papa
apl [2021/12/04 07:35] (current)
papa [APL Character Set]
Line 1: Line 1:
-You can enter the APL interpreter on twenex by typing APLSF. +**APL-20 PANDAMONIUM REIGNS!**
-Then enter tty to use a non-APL keyboard. +
-You can find the keyboard mapping for APLSF on bitsavers here: [[http://bitsavers.trailing-edge.com/pdf/dec/pdp10/TOPS10_softwareNotebooks/vol06/AA-H200A-TK_APLSF_Language_Manual_Aug79.pdf|APLSF_Language_Manual_Aug79.pdf]]+
  
-====== APL Character Set With ASCII and Escape Mode Equivalents ======+**APLSF** (System Function) is an implementation of the APL programming language for TOPS-20 that is available on TWENEX. 
 + 
 +===== In and Out ===== 
 + 
 +To start the APL interpreter, type the following from EXEC: 
 + 
 +  @APLSF 
 +   
 +At the ''terminal..'' prompt, enter ''tty'' for a non-APL keyboard. 
 + 
 +Leave APLSF by entering one of the following commands (APLSF converts all alphabetic input to upper-case): 
 + 
 +|'')MON''|Terminate APLSF and return to EXEC.| 
 +|'')OFF''|Terminate APLSF and log out of TWENEX.| 
 +|'')CONTINUE''|Save active workspace to file ''DSK:CONTIN.APL'', terminate APLSF, log-out from TWENEX. The saved workspace will be loaded automatically the next time you run APLSF.| 
 + 
 +To interrupt APLSF during execution, press ''Ctrl-C'' once or twice.  
 + 
 +Press ''Ctrl-C'' five (5) times to suspend APLSF and return to EXEC. Resume APLSF with command ''@REENTER'' or ''@CONTINUE''
 + 
 + 
 +===== APL Character Set ===== 
 + 
 +Although APL characters cannot be displayed or input when the terminal is in TTY mode, APLSF provides ASCII character string equivalents for all the APL characters as well as "escape mode" (single character preceded by "@") keys that correspond to standard APL keyboard mappings. ASCII and escape mode sequences can be intermixed.
  
 ^ APL \\ Character ^ Name ^ ASCII ^ Escape \\ Mode ^ ^ APL \\ Character ^ Name ^ ASCII ^ ^ APL \\ Character ^ Name ^ ASCII ^ Escape \\ Mode ^ ^ APL \\ Character ^ Name ^ ASCII ^
Line 26: Line 47:
 | ⊤ | ENcode | .EN | @N | | ⍎ | eXecute | .XQ | | ⊤ | ENcode | .EN | @N | | ⍎ | eXecute | .XQ |
 | ∈ | EPsilon | .EP | @E | | ⍕ | ForMat | .FM | | ∈ | EPsilon | .EP | @E | | ⍕ | ForMat | .FM |
-≥ Greater then or Equal to | .GE | | | ⍝ | Comment (lamp) | " | +⌊ FLoor | .FL @D | | ⍝ | Comment (lamp) | " | 
--> GO to (branch) | .GO | | | __A__-__Z__ | underscored alphabetics | .ZA-.ZZ | +≥ Greater then or Equal to | .GE | | | __A__-__Z__ | underscored alphabetics | .ZA-.ZZ | 
-⍳ IOta | .IO @I | | ⍙ | underscored lower del | .Z@ |+-> GO to (branch) | .GO | | | ⍙ | underscored lower del | .Z@ 
 +| ⍳ | IOta | .IO | @I |
 | { | Left curly Brace | .LB | | | { | Left curly Brace | .LB | |
 | ∆ | delta (Lower Del) | .LD | @H | | ∆ | delta (Lower Del) | .LD | @H |
Line 47: Line 69:
 | _ | UnderScore | .US | @F | | _ | UnderScore | .US | @F |
 | ∪ | Up Union | .UU | @V | | ∪ | Up Union | .UU | @V |
 +
 +===== Workspace Commands =====
 +
 +|'')SAVE [//wsname//]''|Save workspace in file ''DSK://wsname//.APL''.|
 +|'')LOAD //wsname//''|Load saved workspace from file ''DSK://wsname//.APL''.|
 +|'')DROP //wsname//''|Delete saved workspace file ''DSK://wsname//.APL''.|
 +|'')CLEAR''|Clear active workspace.|
 +|'')FNS [//letter//]''|List functions in workspace (starting alphabetic list from //letter//).|
 +|'')VARS [//letter//]''|List global variables in workspace (starting alphabetic list from //letter//).|
 +|'')ERASE //name// ...''|Erase global variable or function //name// from workspace.|
 +
 +===== Function Editor =====
 +
 +To define a new function and invoke the editor, enter one of the following commands:
 +
 +|''.DL[//r//_]//a1 f a2//[;//v//]...''|Define a dyadic (two-argument infix) function|
 +|''.DL[//r//_]//f a1//[;//v//]...''|Define a monadic (one-argument prefix) function|
 +|''.DL[//r//_]//f//[;//v//]...''|Define a niladic (no-argument) function|
 +
 +Where:
 +|//f//|Function name|
 +|//a1, a2//|Dummy arguments|
 +|//r//|Dummy variable for return value|
 +|//v//|Local variable|
 +
 +To edit an existing function, enter the command ''.DL//f//''.
 +
 +The editor will start and prompt with the current line number, for example ''[1]''.
 +
 +==== Editor commands ====
 +
 +|''//text//''|Add //text// at current line.|
 +|''[//n//]//text//''|Replace line //n// with //text//. Edit the function header as line 0.|
 +|''[//n.m//]//text//''|Insert //text// as new line after line //n//. (Lines are automatically renumbered after each editing session.)|
 +|''[.LD//n//]''|Delete line //n//.|
 +|''[.BX]''|List function source.|
 +|''[//n//.BX]''|List line //n//.|
 +|''[.BX//n//]''|List from line //n// to the end of the function.|
 +|''.DL''|Save function and return from editor.|
 +
 +Multiple commands can be entered on a single line. For an example, you can open the editor on existing function ''FUN1'', list its source, and immediately exit the editor by entering the following command in the APL interpreter:
 +
 +     .DLFUN1[.BX].DL
 +
 +===== References =====
 +
 +  * [[http://bitsavers.trailing-edge.com/pdf/dec/pdp10/TOPS10_softwareNotebooks/vol06/AA-H200A-TK_APLSF_Language_Manual_Aug79.pdf|APLSF Language Manual]]. Digital Equipment Corporation, 1979. 
 +  * [[http://www.softwarepreservation.org/projects/apl/Manuals/APL1130Primer|APL\1130 Primer]]. International Business Machines Corporation, 1968.
  
apl.1636024484.txt.gz · Last modified: 2021/11/04 11:14 by papa