Special Symbols: Difference between revisions

From NARS2000
Jump to navigationJump to search
m (Paul Robinson moved page Symbol Delta to Special Symbols: Delta isn't a function so I'll use it as the Special Symbols Page)
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__
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.
<h1> {delta} &mdash; (Replace this with Meaning of symbol) &mdash; Keystroke ?ALT+X &mdash; Character 0000</h1>
==Usage==
==Example==
==See Also==


==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'') <big><big>{underbar}</big></big>
* Alpha <big><big>{alpha}</big></big>
* Delta <big><big>{delta}</big></big>
* Delta Underbar <big><big>{deltaunderbar}</big></big>
* Omega <big><big>{omega}</big></big>
* While the underlined capital letters <big><big><u>A</u></big></big> through <big><big><u>Z</u></big></big> 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 <big><big>#</big></big> 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'''.


{{Language Toolbar}}
===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 <big><big>{quad}</big></big> 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.
 
{{Article footer}}
[[Category:Mouse Group 11]]

Latest revision as of 12:53, 24 November 2014

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.

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

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