Special Symbols

From NARS2000
(Redirected from )
Jump to: navigation, search

Some symbols used by APL or NARS2000 are not operators, but they do have other uses in APL or NARS2000. They are used for user identifiers, magic functions, or are set aside for future use as APL operators which are not yet implemented.

Contents

User Identifiers

Some symbols are available as identifiers (names of functions or variables) instead of as APL operators. These symbols may be used to begin an identifier or some may only be used as the second or subsequent character of an identifier.

First Character

The following are allowable as the first character of the name of a variable or user function:

  • Lower case a through z
  • Upper case A through Z
  • Underbar (or underline) _
  • Alpha
  • Delta
  • Delta Underbar
  • Omega
  • While the underlined capital letters A through Z are available as identifiers, you cannot enter them as NARS2000 does not support entry of underlined letters at this time. You would have to save your workspace then edit the workspace file with a text editor, substituting the characters in the identifier with the names of those letters to be able to use underlined identifiers. Also the definition of the characters is not stable at this time, some fonts do not include underlined characters and some do not use the correct unicode points for them. Underlined capital letters have generally been deprecated since it's now possible to have upper and lower case in identifiers. At some point underlined capital letters should be replaced with plain capital letters.
  • The pound symbol # may be used to define a "magic function," a user defined function which is available as a quad function. It cannot be used as the first character of a variable or a normal function. There are special rules involved; See below under magic functions.

Subsequent Characters

The following are allowable as the second or subsequent character of the name of a variable or user function

  • All of the first characters listed above
  • Digits 0 through 9

Magic Functions

Main article: Magic Functions.

Magic functions allow you to create quad operators. The magic function is defined in the same way as a regular function but with a pound sign # as the first character. The function may be niladic, monadic, or dyadic. The function is then accessed as any of the standard system functions by substituting the quad symbol for the pound sign as used in the function definition. A magic function has to be at least two characters, with the # indicating it's a magic function, and the character after the pound sign being the first character of the name, and must follow the rules under First character above, and characters after the first are allowed to use the Subsequent Characters set listed above.


Other Characters

Some characters may be enterable on the keyboard but either are APL operators but are not yet implemented, or are neither APL operators nor usable as a character in an identifier.

More later.


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