Page 1¶
Software Programming Language¶
ND 10196 APL-100¶
ND 10538 APL-500¶
INTRODUCTION¶
APL is a concise and powerful programming language for scientific and commercial applications.
The language interactively executes user-written expressions or functions without intermediate compilation. Using a highly efficient interpreter schema, combined with APL's compact notation, it processes user applications very quickly.
An APL system offers a total development and execution environment, consisting of a Full Screen Editor (accepts many popular CRT/video terminals), mathematical and system functions, direct executions of expressions, file system support for exchange of data (both between APL applications as well as other programming languages), use native files and debugging and performance analysis.
User-written functions can be defined and tested, combined into higher level applications, saved on permanent disk-files, and copied into other applications as needed within the APL environment.
The Norsk Data APL language is available in two versions: APL-100 for the ND-100 16-bit minicomputer systems, and the APL-500 for the ND-500 CX series of 32-bit superminis. Both systems offer the same functions and conveniences, although performance may differ due to hardware capabilities.
FEATURES¶
- Powerful APL language processor, highly optimized for fast execution.
- Functional level as of IBM APLVS(r) and STSC APL + PLUS(r).
- Includes all standard APL primitives, ⍴ -commands, and ⍥ -functions and variables.
- Extended quad-functions for report formatting, (
⍵ FMT), screen oriented input and output (⍵ SCREEN), and several new string manipulations (⍵ SSand⍵ BOX). - Large Workspaces that dynamically expand; on the APL-100 up to 1MB, and on the APL-500 up to 3MB.
- Built-in FULL SCREEN EDITOR, simplifying writing and modification of user defined functions and character data. Accepts many different APL-terminals from several vendors.
- File system support, both APL component files for exchange of data between APL applications; and Native (ASCII) file for exchange of data from other programming languages, spooling of output and setting character-font on suitable printers.
- Structured programming support using APLGOL, a block oriented «super-APL» language using IF-THEN-ELSE, CASE, LOOP-UNTIL, DO-WHILE etc., freely intermixed with ordinary APL-functions.
- Extensive program debugging tools: quad-functions for stopping, tracing, and monitoring the execution of APL-statements without prior preparations.
- Help information on two levels: listing of implemented commands and quad-functions, and detailed explanation and examples for each topic. The FULL SCREEN EDITOR also contains extensive help-information.
PRODUCT DESCRIPTION¶
The APL-100 uses 48-bit floating-point representation, giving up to 9 significant digits for real numbers. The APL-500 uses 64-bit floating-point for up to 15 significant digits.
On APL-100 the active workspace is kept on a disk-file transparent for the user, and may be as large as 1MB. The full workspace need not be in memory at any time, and a software cache keeps track of which functions and data are most active in memory, swapping out on the disk when necessary.
On APL-500 the workspace may be addressed without constraints. However, the maximum workspace has been set to 3MB.
Several active users may access the APL-system, and execute the same workspace simultaneously since each user will have his/her own copy during execution. Datafiles may be shared and continuously updated; a protecting mechanism allows only one user to change data at a time.
Page 2¶
REQUIREMENTS¶
The APL-100 can run on any ND-100/CX version under the operating system SINTRAN III/VSX version I or later. The software modules constitute a set of 5 re-entrant segments, occupying approximately 285 pages on one of the segmentfiles. During execution, the background segment for each user must be 128 pages; several active users will share common segments.
The APL-500 consists of one ND-500 domain occupying approximately 330 pages on the system disk. It may be installed as a common standard domain.
The terminal definition file, help-file for commands and editor, requires approximately 30 pages, stored under user SYSTEM.
A terminal with APL character set is mandatory during program development (applications may run on any ASCII terminal), either CRT or hardcopy. Although ND does not offer APL terminals, the TANDBERG TDV 2221 APL/ANSI is highly recommended due to its excellent ergonomic and Full Screen capabilities.
DOCUMENTATION¶
ND APL User Guide .................................................ND-60.170
APL SUMMARY¶
Commands:¶
| Command | Description |
|---|---|
| )HELP )QUADHELP | list available commands or quad-functions |
| )LOAD )QLOAD )XLOAD | load a named workspace, with or without displaying the date last saved, XLOAD does not execute any latent OLX functions |
| )SAVE )DROP )WSULB | save active workspace, delete a stored ws, and displays the names of stored ws |
| )COPY )PCOPY | copies into the active ws from a stored ws, either all or selected objects |
| )FNS )VARS )ERASE | displays named functions or variables, or erases such |
| )SI )ISNL )RESET | list State Indicator, with Named Local variables, reset SI |
| )FLIB )WSULIB )SET | displays name of files, workspace, and set terminal type or editor type |
| )SINTRAN | execute commands in the operating system |
System functions:¶
ARBIN Arbitrary Input IDLIST Identifier List
ARBOUT Arbitrary Output IDLOCK Identifier Localization
ASCII ASCII Character Set LOCK Lock Defined Functions
BOX Character Vector to Matrix MONITORR Remove Monitoring
Transformation MONITORS Set Monitoring
CR Canonical Representation of a MONITORRV Remove Monitoring
Function NC Name Classification of Identifiers
CROSS Cross-Reference NL Name List of Identifiers
CRL Display Single Line of a OFF Terminate APL
Function PRINT Spooling File Close
DEF Function Definition RNL Random Link
DEFL Single Function Line SCREEN Screen Handling
Definition SIZE Size of Identifiers
EX Execution Link SPOOL Spooling File Append
DM Diagnostic Message SS String Search
DR Data Representation STOPR Remove Stops
ERASE Erase Objects STOPS Set Stops
ERRM Signal an Error Exception TRACER Remove Trace
FEX Erase Objects TRACES Set Trace
FMT Format Conversion VI Verification of Format
FX Report Formatting VR Visual Representation of a Function
Page 3¶
File Functions¶
| Function | Description |
|---|---|
| FCOMPS | List used component numbers (1) |
| FCREATE | Create and open file |
| FDROP | Delete file |
| FERASE | Erase component (1) |
| FNAMES | List names of all tiled files |
| FNUMES | List tile numbers for all tiled files |
| FPACK | Pack a component file (1) |
| FREAD | Read file |
| FRDCI | Display information about a component (1) |
| FSBP | Display or set byte pointer (2) |
| FSIZE | Display information about a tied file |
| FSTIE | Open file for shared use (1) |
| FTIE | Open file |
| FUNTIE | Close file(s) |
| FWRITE | Write component/character(s) to file |
(1) APL component files only
(2) Native SINTRAN files only
System Variables¶
| Variable | Description |
|---|---|
| A | The Alphabet |
| AI | Accounting Information |
| ALX | Attention Latent Expression |
| AV | Atomic Vector |
| CPUID | Computer Type and Serial Number |
| CT | Comparison Tolerance |
| ELX | Error Latent Expression |
| IO | Index Origin |
| LC | Line Counter |
| LX | Latent Expression |
| ⌽ D | The Digit Characters |
| PP | Printing Precision |
| PW | Print Width |
| ⊥ SA | Stop Action |
| ⊤ SI | State Indicator |
| SYMBOL | Workspace Symbols |
| SYSID | APL System Identification and Version Number |
| TS | Current Timestamp |
| UL | User Load |
| USERID | User Identification |
| WA | Workspace Area |
| WSID | Workspace Identification |
| WSOWNER | Workspace Owner |
| WSSIZE | Workspace Size |
| WSTS | Workspace Timestamp |
Terminal Control¶
| Control | Description |
|---|---|
| TCxxx | Terminal Control |
| TCBEL | TCBEL for bell |
| TCBS | TCBS for backspace |
| TCDEL | TCDEL for delete |
| TCESC | TCESC for escape |
| TCLF | TCLF for line-feed |
| TCNL | TCNL for new-line |
| TCNUL | TCNUL for null-character |
Full Screen Edit Commands¶
| Command | Description |
|---|---|
| A | A SCII |
| B | B ottommark |
| CHAR | Character |
| CO | CO py |
| D | D elete |
| EXIT | E xpand |
| F | F irst |
| FO | FO rward |
| FU | FU nction |
| G | G et |
| H | H elp |
| I | I nc |
| J | J oin |
| L | L ast |
| LINK | LINK E |
| IL | IL ne |
| LOCK | LOCK |
| Y | Y |
| MA | MA trix |
| MO | MO ve |
| NOA | NOA scii |
| NOE | NOE xpand |
| NON | NON umber |
| NU | NU mber |
| RE | RE verse |
| SP | SP lit |
| S | S ubstitute |
| T | T opmark |
| V | V ector |
| WID | WID th |
| W | W indow |
Line Editor Commands¶
⌽ activate editor
/ delete character
1 _ 9 expand blanks
A _ Z expand blanks (A = 5, B = 10)
.text insert text
:.text insert text, display line
!.text insert text, display, terminate
[] first line/position
↓ terminate edit
↵ terminate and lock
APLOGOL Statements¶
α : designates APLOGOL expression or function
IF expr THEN block1 ELSE block2
CASE test OF nnn DO
... block1
ELSE blockn ENDCASE
LOOP block UNTIL test
WHILE test DO block
EXIT
HALT
LEAVE
REPEAT
RESTART
block: a single expression or a structure consisting of BEGIN statement <> statement END
test: simple expression yield an explicit result
ivn: invocation number, integer singleton or vector
Miscellaneous¶
| Item | Description |
|---|---|
| ~ | Negative Constant Indicator |
| # | Character Constant Delimiter |
| ← | Assignment |
| ↑ | Branch |
| £ | Evaluated Input, Output |
| © | Internal Input, Promoting Output |
| () | Grouping |
| ; | Statement Separator |
| ∘ | Statement Separator(APLOGOL), List Separator |
| : | Label Indicator |
| ʠ | Comment Delimiter |
Circular Functions¶
| R - A⊖B | |
|---|---|
| A | R |
| 7 | ar tanh B |
| -6 | arc cosh B |
| -5 | 2 arc cos B |
| -4 | 2r sinh B |
| -3 | (1⊖B2)5 |
| -2 | - |
| -1 | sin B |
| 0 | 1 |
| 1 | arc cos B |
| 2 | arc sin B |
| 4 | (1⊖B2)5 |
| 5 | sinh B |
| 6 | cos B |
| 7 | tanh B |
Page 4¶
Primitive Functions and Operators¶
Monadic¶
| Function | Symbol |
|---|---|
| IDENTITY | |
| NEGATE | - |
| SIGNUM | × |
| RECIPROCAL | ÷ |
| EXPONENTIAL | ⋅ |
| NATURAL LOGARITHM | @ |
Dyadic¶
| Function | Symbol |
|---|---|
| ADDITION | + |
| SUBTRACTION | . |
| MULTIPLICATION | × |
| DIVISION | ÷ |
| POWER | ⋅ |
| GENERAL LOGARITHM | @ |
| AND | ∧ |
| OR | ∨ |
| NAND | |
| NOR | |
| NOT | - |
| LESS THAN | < |
| LESS THAN OR EQUAL | < |
| EQUAL | = |
| NOT EQUAL | ≠ |
| GREATER THAN OR EQUAL | > |
| GREATER THAN | > |
| ROLL | |
| PI TIMES | ☐ |
| CEILING | ⌐ |
| FLOOR | ├ |
Additional Functions and Symbols¶
Various Operations¶
| Function | Symbol |
|---|---|
| ABSOLUTE VALUE | |
| FACTORIAL | ! |
| SHAPE | ρ |
| AXES (AUXILIARY) | [] |
| REVERSE | Φ ○ |
| TRANSPOSE | ⎍ |
| REDUCTION | / |
| SCAN | \ |
| RAVEL | \o/ |
| GRADE UP | A |
| GRADE DOWN | ¥ |
| EXECUTE | ⌶ |
| DEAL | ? |
| CIRCULAR FUNCTIONS | ○ |
| MATRIX INVERSE | ⌽ |
| RESIDUE | |
| BINOMIAL | ! |
| RESHAPE | ρ |
| I | |
| DROP | |
| INDEXING | |
| INDEX OF | |
| ROTATE | |
| GENERAL TRANSPOSE | |
| COMPRESSION | |
| EXPANSION | |
| CATENATE | |
| MEMBERSHIP | ∋ |
| DECODE | ⌾ |
| ENCODE | |
| EXTENDED EXECUTE | ⌶ |
| EXTENDED FORMAT | ⌶ |
| MATRIX DIVISION | ⌹ |
| GENERALIZED INNER PRODUCT | |
| GENERALIZED OUTER PRODUCT |
Overstrike Characters¶
Overstrike Characters
Formed by striking one key, backspacing, striking other key. Order immaterial.
Symbol | Made with | Symbol | Made with
-------|---------------|--------|--------------
⫶ | ∦ , : | ⸼ | - , :
☉ | , , : | ↮ | ∧ , -
⟛ | □ , | ⦅ | , , :