System Function CS
⎕CS - Collating Sequence
⎕CS is niladic system function which returns a well-known collating sequence appropriate to grading character arrays via the Dyadic Grade function.
|
||||
Z is a four-dimensional character array of shape 10 6 2 27 with 3240 ≡ ×/10 6 2 27 characters. |
The values as arranged as follows:
- The length 27 coordinate contains one space followed by a 26-letter Latin alphabet.
- The length 2 coordinate distinguishes between the lowercase from the uppercase of the Latin alphabet.
- The length 6 coordinate distinguishes between the one unaccented and five accented Latin alphabets.
- The length 10 coordinate distinguishes between the ten digits.
- All other values not specified above are blank.
While this collating sequence is very useful, it is not the end of the question. It needs to be modified for special circumstances, for example, if you are grading numbers with a decimal point. Think of it as a starting point for more special purpose needs.
To give you a flavor of this sequence, here's the first hyperplane of ⎕CS, where a Blank Symbol (␢) is used in place of a space to serve as a visible reminder of its presence:
⎕CS[1;;;]
␢abcdefghijklmnopqrstuvwxyz
0ABCDEFGHIJKLMNOPQRSTUVWXYZ
␢ábćdéfǵhíjḱĺḿńóṕqŕśtúvẃxýź
␢ÁBĆDÉFǴHÍJḰĹḾŃÓṔQŔŚTÚVẂXÝŹ
␢àbcdèfghìjklmǹòpqrstùvẁxỳz
␢ÀBCDÈFGHÌJKLMǸÒPQRSTÙVẀXỲZ
␢âbĉdêfĝĥîĵklmnôpqrstuvwxyz
␢ÂBĈDÊFĜĤÎĴKLMNÔPQRŜTÛVŴXŶẐ
␢äbcdëfgḧïjklmnöpqrsẗüvẅẍÿz
␢ÄBCDËFGḦÏJKLMNÖPQRSTÜVẄẌŸZ
␢ãbcdẽfghĩjklmñõpqrstũṽwxỹz
␢ÃBCDẼFGHĨJKLMÑÕPQRSTŨṼWXỸZ
The following APL pseudo-function describes how ⎕CS could be created:
∇ Z←⎕CS;⎕IO
[1] ⎕IO←1
[2] Z←10 6 2 27⍴' '
[3] Z[1;1;;1+⍳26]←⎕a,[0.5] ⎕A
[4] Z[1;2;;1+⍳26]←⎕á,[0.5] ⎕Á
[5] Z[1;3;;1+⍳26]←⎕à,[0.5] ⎕À
[6] Z[1;4;;1+⍳26]←⎕â,[0.5] ⎕Â
[7] Z[1;5;;1+⍳26]←⎕ä,[0.5] ⎕Ä
[8] Z[1;6;;1+⍳26]←⎕ã,[0.5] ⎕Ã
[9] Z[;1;2;1]←⎕D
∇
See also: Unicode page and ⎕A and friends.
Note: ⎕CS is a niladic form system function, you cannot assign a value to it.
System Variables (A value may be assigned to these except for ⎕DM) | |||||||||
---|---|---|---|---|---|---|---|---|---|
⎕ALX | ⎕CT | ⎕DM | ⎕DT | ⎕ELX | ⎕FC | ⎕FEATURE | ⎕FPC | ⎕IC | ⎕IO |
⎕LR | ⎕LX | ⎕PP | ⎕PR | ⎕PW | ⎕RL | ⎕SA | ⎕WSID | ||
Niladic System Functions (a value cannot be assigned to these) | |||||||||
⎕A | ⎕AV | ⎕EM | ⎕ET | ⎕LC | ⎕NNAMES | ⎕NNUMS | ⎕SI | ⎕SYSID | ⎕SYSVER |
⎕T | ⎕TC | ⎕TCBEL | ⎕TCBS | ⎕TCESC | ⎕TCFF | ⎕TCHT | ⎕TCLF | ⎕TCNL | ⎕TCNUL |
⎕TS | ⎕WA | ||||||||
Monadic or dyadic system functions (a value cannot be assigned to these) | |||||||||
⎕AT | ⎕CR | ⎕DC | ⎕DFT | ⎕DL | ⎕DR | ⎕EA | ⎕EC | ⎕ERROR | ⎕ES |
⎕EX | ⎕FMT | ⎕FX | ⎕MF | ⎕NAPPEND | ⎕NC | ⎕NCREATE | ⎕NERASE | ⎕NINFO | ⎕NL |
⎕NLOCK | ⎕NREAD | ⎕NRENAME | ⎕NREPLACE | ⎕NRESIZE | ⎕NSIZE | ⎕NTIE | ⎕NUNTIE | ⎕STOP | ⎕TF |
⎕TRACE | ⎕UCS | ⎕VR | |||||||
Note that quad functions and variables (except for the ⎕A family of functions) are case insensitive |
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 |