System Function CR
This function is available in both monadic and dyadic forms
Monadic Function
|
||||
| R is a character scalar or vector. | ||||
| Z is a character matrix with as many rows as there are lines in the function (including the header), and as many columns as the longest line (including the header). |
This monadic function behaves the same as described in the Extended APL Standard, except it also displays the canonical representation of an assigned function or operator.
For example,
f←,∘⍋∘⍋∘,
⍴⎕←⎕cr 'f'
,∘⍋∘⍋∘,
1 7
If the assigned function references an unnamed value which is not a simple scalar, the representation shows a marker in that spot.
For example,
f←'abcdefg'∘⎕cr
⎕cr 'f'
…∘⎕cr
f←⎕cr
⎕cr 'f'
f
f 'f'
f
Dyadic Function
|
||||
| R is a character scalar or vector. | ||||
| L is an integer scalar whose value is either 1 or 2. |
If the first character in R is #, then R is assumed to name an internal Magic Function; otherwise R is assumed to name a user-defined function/operator or a directly assigned function (e.g., f←+.×).
If L=2, then Z is a character matrix with as many rows as there are lines in the function (including the header), and as many columns as the longest line (including the header).
If L=1, then Z is either a simple character vector (for directly assigned functions), or a vector of character vectors (for user-defined functions/operators) with as many elements in Z as there are lines in the function (including the header), and each element of Z is a character vector representation of the corresponding line (or header) in the function.
For example,
f←+.×
⍴⎕←2 ⎕cr 'f'
+.×
1 3
⍴⎕←1 ⎕cr 'f'
+.×
3
2 ⎕cr '#MonIota'
Z←#MonIota R
Z←⊃∘.,/⍳¨R
1 ⎕cr '#MonIota'
Z←#MonIota R Z←⊃∘.,/⍳¨R
When this was written, the existing magic functions were named #MonIota, #DydIota, #MonDnShoe, #DydTilde, #MonRank, #DydRank, #Conform, #MonFMT, #Box, and #MonVR.
Note: ⎕CR is available as both a monadic and dyadic 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 | ||||||||||||||
| 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 {{#ifeq:0|1||title="assign" style="border-width:thick; border-color:blue; background-color:yellow;" |← |
→ | bgcolor=cyan | title="assign" |← | → | }}
{{#ifeq:0|2||title="plus" style="border-width:thick; border-color:blue; background-color:yellow;" |+ |
- | × | ÷ | * | ⍟ | ⌹ | ○ | ! | ? | √ | bgcolor=cyan | title="plus" |+ | - | × | ÷ | * | ⍟ | ⌹ | ○ | ! | ? | √ | }}
{{#ifeq:0|3||title="mod" style="border-width:thick; border-color:blue; background-color:yellow;" || |
⌈ | ⌊ | ⊥ | ⊤ | ⊣ | ⊢ | |||||||||||||||||||
| ⌈ | ⌊ | ⊥ | ⊤ | ⊣ | ⊢ | ||||||||||||||||||||||||||||||||||||||||||||||||
| ≢ | < | ≤ | = | ≥ | > | ≠ | bgcolor=cyan | title="match" |≡ | ≢ | < | ≤ | = | ≥ | > | ≠ | }}
{{#ifeq:0|5||title="down caret" style="border-width:thick; border-color:blue; background-color:yellow;" |∨ |
∧ | ⍱ | ⍲ | bgcolor=cyan | title="down caret" |∨ | ∧ | ⍱ | ⍲ | }}
{{#ifeq:0|6||title="take" style="border-width:thick; border-color:blue; background-color:yellow;" |↑ |
↓ | ⊂ | ⊃ | ⌷ | ⍋ | ⍒ | ||||||||||||||||||||||
| ↓ | ⊂ | ⊃ | ⌷ | ⍋ | ⍒ | ||||||||||||||||||||||||||||||||||||||||||||||||
| ∊ | ⍸ | ⍷ | ∪ | ∩ | ⊆ | ⊇ | ~ | § | π | .. | bgcolor=cyan | title="iota" |⍳ | ∊ | ⍸ | ⍷ | ∪ | ∩ | ⊆ | ⊇ | ~ | § | π | .. | }}
{{#ifeq:0|8||title="comma" style="border-width:thick; border-color:blue; background-color:yellow;" |, |
⍪ | ⍴ | ⌽ | ⊖ | ⍉ | ||||||||||||||||||||||||
| ⍪ | ⍴ | ⌽ | ⊖ | ⍉ | |||||||||||||||||||||||||||||||||||||||||||||||||
| \ | ⌿ | ⍀ | ⊙ | ¨ | ⍨ | ⍤ | ⍡ | ⍥ | ⍦ | . | ∘ | ⍠ | ‼ | ⌻ | ∂ | ∫ | bgcolor=cyan | title="slash" |/ | \ | ⌿ | ⍀ | ⊙ | ¨ | ⍨ | ⍤ | ⍣ | ⍡ | ⍥ | ⍦ | . | ∘ | ⍠ | ‼ | ⌻ | ∂ | ∫ | }}
{{#ifeq:0|10||title="quotequad" style="border-width:thick; border-color:blue; background-color:yellow;" |⍞ |
⎕ | ⍎ | ⍕ | |||||||||||||
| ⎕ | ⍎ | ⍕ | |||||||||||||||||||||||||||||||||||||||||||||||||||
| ⍝ | ∇ | ∆ | ⍙ | _ | ⍺ | ⍵ | bgcolor=cyan | title="diamond" |⋄ | ⍝ | ∇ | ∆ | ⍙ | _ | ⍺ | ⍵ | }}
{{#ifeq:0|12||title="neg" style="border-width:thick; border-color:blue; background-color:yellow;" |¯ |
⍬ | ∞ | title="neg" |¯ | ⍬ | ∞ | ∅ | |||||||||||||||||||||||||||||||
| colspan=8 |Second Row | i j k | a | b | e | g | p | r | v | x | z | colspan=8 |Second Row | i j k | a | b | e | g | p | r | v | x | z | colspan=8 |Second Row | i j k | a | b | e | g | p | r | v | x | z | colspan=6 |Second Row | i j k | i j k l | g | p | r | v | x
}} | |||||||||||||
{{#ifeq:0|0| |}}