From NARS2000
(Redirected from Functions)
Jump to navigationJump to search

A function is a named location which provides for a series of instructions to be executed in sequence. A function in APL serves the purpose of both a function or procedure in other high-level languages such as C or Pascal. Functions are of three kinds: niladic (has no arguments); monadic (has one argument specified to the right of the function name); or dyadic (has an argument to the right and to the left of the function name.

Like variables, functions in APL in general, and NARS2000 in particular, come in two flavors: user functions and system functions.

User Functions

User functions come into existence when the creator of a workspace creates the function. Th rules for naming a user function are as follows:

-- Do later --

System functions

System functions are created by NARS2000 when the program starts. They begin with the quad symbol , and one or more letters. The current list of system functions is as follows:

Niladic System Functions
⎕A The alphabet from A to Z, also Á to Ź,  to Ẑ, À to À, Ä to Z and à to Z, all in lowercase, too
using the variations ⎕a ⎕A ⎕á ⎕Á ⎕à ⎕À ⎕â ⎕Â ⎕ä ⎕Ä ⎕ã ⎕Ã
⎕AV Atomic Vector
⎕CS Collating sequence
⎕EM Event Message
⎕ET Event Type
⎕LC Line Counter
⎕NNAMES Names of Open Native Files
⎕NNUMS Tie Numbers of Open Native Files
⎕SI State Indicator
⎕SYSID System Identifier
⎕SYSVER System Version
⎕T Tickcount
⎕TC Terminal Control Characters
⎕TCBEL Terminal Control Character, Bell
⎕TCBS Terminal Control Character, Backspace
⎕TCESC Terminal Control Character, Escape
⎕TCFF Terminal Control Character, Form Feed
⎕TCHT Terminal Control Character, Horizontal Tab
⎕TCLF Terminal Control Character, Line Feed
⎕TCNL Terminal Control Character, New Line
⎕TCNUL Terminal Control Character, Null
⎕TS Time Stamp
⎕WA Workspace Available
Monadic or dyadic system functions
⎕AT Attributes
⎕CR Canonical representation
⎕DFT Discrete Fourier Transform
⎕DL Delay or pause APL processing
⎕DR Data representation
⎕EA Execute alternate
⎕EC Execute controlled
⎕ERROR Signal error
⎕ES Event simulate
⎕EX Expunge names
⎕FMT Format
⎕FX Function fix
⎕MF Monitor function
⎕NAPPEND Append data to an open native file
⎕NC Name classification
⎕NCREATE Create and open a native file
⎕NERASE Erase an open native file
⎕NINFO Native file information
⎕NL Name list
⎕NREAD Read data from an open native file
⎕NRENAME Rename an open native file
⎕NREPLACE Replace data in an open native file
⎕NRESIZE Resize an open native file
⎕NSIZE Get the size of an open native file
⎕NTIE Open a native file
⎕NUNTIE Close a native file
⎕STOP Stop execution of a user-defined function/operator/hyperator or Magic Function
⎕TF Transfer form
⎕TRACE Trace execution of a user-defined function/operator/hyperator or Magic Function
⎕UCS Universal character set
⎕VR Vector representation of a function

See Also
System Commands System Variables and Functions Operators

Alt ¨ ¯ < > × ÷
Sh ~ ! @ # $ % ^ & * ( ) _ +
Key ` 1 2 3 4 5 6 7 8 9 0 - =
Alt ? § π
Sh Q W E R T Y U I O P { } |
Key q w e r t y u i o p [ ] \
Sh A S D F G H J K L : "
Key a s d f g h j k l ; '
Sh Z X C V B N M < > ?
Key z x c v b n m , . /
NARS 2000 Lang
+ - × ÷ * ! ? |
< = >
~ § π .. ,
/ \ ¨ .
_ ¯
Second Row i j k i j k l g p r v x

[[Category:Mouse Group {{{1}}}|{{{2}}}]]

This NARS2000 article is a stub and needs further work.