System Function AT: Difference between revisions
No edit summary |
No edit summary |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{BoxStart|<apll>Z←L ⎕AT R</apll> | |||
|returns the attributes of the objects named in <apll>R</apll>.}} | |||
{{BoxLine|<apll>R</apll> is a character scalar, vector, or matrix consisting of the names of objects (e.g., variables, functions, operators, or hyperators).}} | |||
{{BoxLine|<apll>L</apll> is an integer scalar whose value is either <apll>1</apll>, <apll>2</apll>, <apll>3</apll>, <apll>4</apll>, or <apll>10</apll>.}} | |||
{{BoxEnd|<apll>Z</apll> is an integer vector or matrix.}} | |||
</ | |||
<p>If <apll>R</apll> is a scalar, it is treated as the name; if <apll>R</apll> is a vector, it is treated as a vector of names separated from one another by one or more blanks; if <apll>R</apll> is a matrix, each row is treated as a single name surrounded by zero or more blanks.</p> | <p>If <apll>R</apll> is a scalar, it is treated as the name; if <apll>R</apll> is a vector, it is treated as a vector of names separated from one another by one or more blanks; if <apll>R</apll> is a matrix, each row is treated as a single name surrounded by zero or more blanks.</p> | ||
<p>If <apll>R</apll> consists of a single name, <apll>Z</apll> is a vector; otherwise <apll>Z</apll> is a matrix with as many rows as there are names in <apll>R</apll>.</p> | <p>If <apll>R</apll> consists of a single name or <apll>L</apll> is <apll>10</apll>, <apll>Z</apll> is a vector; otherwise <apll>Z</apll> is a matrix with as many rows as there are names in <apll>R</apll>.</p> | ||
<p>The number of columns in <apll>Z</apll> depends upon the value of <apll>L</apll>.</p> | <p>The number of columns in <apll>Z</apll> depends upon the value of <apll>L</apll>.</p> | ||
<ul> | <ul> | ||
<li><p>If <apll>L</apll> is <apll>1</apll>, the result describes the '''Valences''' of the objects named in <apll>R</apll> and has | <li><p>If <apll>L</apll> is <apll>1</apll>, the result describes the '''Valences''' of the objects named in <apll>R</apll> and has four columns consisting of<br /> | ||
<apll>[1]</apll> Whether or not there is an '''Explicit result''' (<apll>1</apll> or <apll>0</apll>): This value is <apll>1</apll> for variables and for functions/operators that return a result; <apll>0</apll> otherwise.<br /> | <apll>[1]</apll> Whether or not there is an '''Explicit result''' (<apll>1</apll> or <apll>0</apll>): This value is <apll>1</apll> for variables and for functions/operators/hyperators that return a result; <apll>0</apll> otherwise.<br /> | ||
<apll>[2]</apll> The '''Function Valence''' (<apll>0</apll>, <apll>1</apll>, or <apll>2</apll>): This value is <apll>0</apll> for a non-function or for a niladic function, <apll>1</apll> for a monadic function or for a monadic derived function from an operator, and <apll>2</apll> for a dyadic or ambivalent function or for a dyadic or ambivalent derived function from an operator.<br /> | <apll>[2]</apll> The '''Function Valence''' (<apll>0</apll>, <apll>1</apll>, or <apll>2</apll>): This value is <apll>0</apll> for a non-function or for a niladic function, <apll>1</apll> for a monadic function or for a monadic derived function from an operator/hyperator, and <apll>2</apll> for a dyadic or ambivalent function or for a dyadic or ambivalent derived function from an operator/hyperator.<br /> | ||
<apll>[3]</apll> The '''Operator valence''' (<apll>0</apll>, <apll>1</apll>, or <apll>2</apll>): This value is <apll>0</apll> for a non-operator, <apll>1</apll> for a monadic operator, and <apll>2</apll> for a dyadic operator.</p></li> | <apll>[3]</apll> The '''Operator valence''' (<apll>0</apll>, <apll>1</apll>, or <apll>2</apll>): This value is <apll>0</apll> for a non-operator, <apll>1</apll> for a monadic operator, and <apll>2</apll> for a dyadic operator.<br /> | ||
<apll>[4]</apll> The '''Hyperator valence'''(<apll>0</apll>, <apll>1</apll>, or <apll>2</apll>): This value is <apll>0</apll> for a non-hyperator, <apll>1</apll> for a monadic hyperator, and <apll>2</apll> for a dyadic hyperator.</p></li> | |||
<li><p>If <apll>L</apll> is <apll>2</apll>, the result describes the '''Fix Time''' of the objects named in <apll>R</apll> and has seven columns consisting of<br /> | <li><p>If <apll>L</apll> is <apll>2</apll>, the result describes the '''Fix Time''' of the objects named in <apll>R</apll> and has seven columns consisting of<br /> | ||
Line 46: | Line 27: | ||
<apll>[7]</apll> Millisecond<br /> | <apll>[7]</apll> Millisecond<br /> | ||
<br /> | <br /> | ||
If an object named in <apll>R</apll> is not a user-defined function/operator, the corresponding row in the result is all <apll>0</apll>. All times are in UTC and represent the time the function was last modified. | If an object named in <apll>R</apll> is not a user-defined function/operator/hyperator, the corresponding row in the result is all <apll>0</apll>. All times are in UTC and represent the time the function was last modified. | ||
</p></li> | </p></li> | ||
Line 62: | Line 43: | ||
<apll>[2]</apll> The object's data size only.<br /> | <apll>[2]</apll> The object's data size only.<br /> | ||
</p></li> | </p></li> | ||
<li><p>If <apll>L</apll> is <apll>10</apll>, the result describes the '''Function Type''' of the objects named in <apll>R</apll>. The values in the result are integer scalars one per name in <apll>R</apll> and have the following meaning:<br /></p> | |||
<table name="FcnTypes" border="1" cellpadding="5" cellspacing="0" rules="none" summary=""> | |||
<tr> | |||
<td><apll>0</apll></td> | |||
<td>The object is not a function/operator/hyperator</td> | |||
</tr> | |||
<tr> | |||
<td><apll>1</apll></td> | |||
<td>The object is a '''Primitive Function, Operator, or Hyperator'''</td> | |||
<td><apll>f←+</apll></td> | |||
<td><apll>f←/</apll></td> | |||
</tr> | |||
<tr> | |||
<td><apll>2</apll></td> | |||
<td>The object is a '''Derived Function, Operator, or Hyperator'''</td> | |||
<td><apll>f←+/</apll></td> | |||
<td><apll>f←⍨∘÷</apll></td> | |||
</tr> | |||
<tr> | |||
<td><apll>3</apll></td> | |||
<td>The object is a '''User-defined Function, Operator, or Hyperator'''</td> | |||
<td><apll>∇f</apll></td> | |||
<td><apll>∇(LO f) R</apll></td> | |||
<td> </td> | |||
<td><apll>∇(LO (LH f RH)) R</apll></td> | |||
</tr> | |||
<tr> | |||
<td><apll>4</apll></td> | |||
<td>The object is a '''System Function, Operator, or Hyperator'''</td> | |||
<td><apll>f←⎕NL</apll></td> | |||
</tr> | |||
<tr> | |||
<td><apll>5</apll></td> | |||
<td>The object is an '''Anonymous Function, Operator, or Hyperator'''</td> | |||
<td><apll>f←{⍺+⍵}</apll></td> | |||
<td><apll>f←{⍺⍺/¨⍵}</apll></td> | |||
<td> </td> | |||
<td><apll>f←{⍺⍺⍺⍨⍺⍺/¨⍵}</apll></td> | |||
</tr> | |||
<tr> | |||
<td><apll>6</apll></td> | |||
<td>The object is a '''Train'''</td> | |||
<td><apll>f←(+/÷≢)</apll></td> | |||
</tr> | |||
<tr> | |||
<td><apll>7</apll></td> | |||
<td>The object is a '''Name-Associated Function'''</td> | |||
<td>Not as yet implemented</td> | |||
</tr> | |||
<tr> | |||
<td><apll>8</apll></td> | |||
<td>The object is a '''Java-Associated Function'''</td> | |||
<td>Not as yet implemented</td> | |||
</tr> | |||
</table> | |||
</li> | |||
</ul> | </ul> | ||
==Examples== | |||
<big> | |||
'''⎕AT - Quad AT''' - Object Summary Attributes - sample dyadic calls (re workspace user-function attributes): | |||
<pre> | |||
2 ⎕AT ⊃'UCase' 'LCase' ⍝ Request to show 'Date/Time last modified' Attribute for two workspace functions | |||
2015 2 4 0 23 55 926 ⍝ Yr Mo Day Hr Min Sec Milli-Secs format - same format as ⎕TS (quad time stamp) | |||
2015 2 4 0 23 37 839 | |||
X←⊃'UCase' 'LCase' | |||
⍴X | |||
2 5 | |||
X | |||
UCase | |||
LCase | |||
(1 ⎕AT X),'|',(2 ⎕AT X),'|',(3 ⎕AT X),'|',(4 ⎕AT X),'|',(10 ⎕AT X) | |||
1 1 0 0 | 2015 2 4 0 23 55 926 | 0 0 0 0 | 19626 6434 | 3 | |||
1 1 0 0 | 2015 2 4 0 23 37 839 | 0 0 0 0 | 18424 6448 | 3 | |||
⍝ 1 1 0 0 = {Yes Explicit Function Result Z} {Monadic Function Valence} {Non-Operator} {Non-Hyperator} : 1 ⎕AT fcn-names | |||
⍝ UTC/GMT Date/Time last edited-saved : 2 ⎕AT fcn-names | |||
⍝ 0 0 0 0 = {Non-displayable (0), Non-suspendable (0), Ignores weak interrupts (0), Always zero (0)} : 3 ⎕AT fcn-names | |||
⍝ 19626 6434 = {object header and data sizes, # bytes} {data size only, # bytes} : 4 ⎕AT fcn-names | |||
⍝ 3 = {Function Type = User-Defined Function/Operator/Hyperator} : 10 ⎕AT fcn-names | |||
⍝ BE ADVISED: 2 ⎕AT for each object will be in UTC/GMT time (ditto ⎕VR) while ⎕TS will be in local time (e.g. Eastern or Pacific time), | |||
⍝ so for comparisons between (2 ⎕AT functions v. ⎕TS) you have to add or subtract n hours from one or the other for equivalency! | |||
</pre></big> | |||
'''See Also: [[System_Function_TS|Quad Time Stamp ⎕TS]]''' for 7-element DateTime stamp format.<br> | |||
{{ | {{SFD|AT}} |
Latest revision as of 09:42, 19 March 2019
|
||||
R is a character scalar, vector, or matrix consisting of the names of objects (e.g., variables, functions, operators, or hyperators). | ||||
L is an integer scalar whose value is either 1, 2, 3, 4, or 10. | ||||
Z is an integer vector or matrix. |
If R is a scalar, it is treated as the name; if R is a vector, it is treated as a vector of names separated from one another by one or more blanks; if R is a matrix, each row is treated as a single name surrounded by zero or more blanks.
If R consists of a single name or L is 10, Z is a vector; otherwise Z is a matrix with as many rows as there are names in R.
The number of columns in Z depends upon the value of L.
If L is 1, the result describes the Valences of the objects named in R and has four columns consisting of
[1] Whether or not there is an Explicit result (1 or 0): This value is 1 for variables and for functions/operators/hyperators that return a result; 0 otherwise.
[2] The Function Valence (0, 1, or 2): This value is 0 for a non-function or for a niladic function, 1 for a monadic function or for a monadic derived function from an operator/hyperator, and 2 for a dyadic or ambivalent function or for a dyadic or ambivalent derived function from an operator/hyperator.
[3] The Operator valence (0, 1, or 2): This value is 0 for a non-operator, 1 for a monadic operator, and 2 for a dyadic operator.
[4] The Hyperator valence(0, 1, or 2): This value is 0 for a non-hyperator, 1 for a monadic hyperator, and 2 for a dyadic hyperator.If L is 2, the result describes the Fix Time of the objects named in R and has seven columns consisting of
[1] Year
[2] Month
[3] Day
[4] Hour
[5] Minute
[6] Second
[7] Millisecond
If an object named in R is not a user-defined function/operator/hyperator, the corresponding row in the result is all 0. All times are in UTC and represent the time the function was last modified.If L is 3, the result describes the Execution Properties of the objects named in R and has four columns consisting of
[1] Whether or not the object is Nondisplayable (1 or 0)
[2] Whether or not the object is Nonsuspendable (1 or 0)
[3] Whether or not the object Ignores weak interrupts, i.e. Ctrl-C or Ctrl-Break (1 or 0)
[4] Whether or not the object Converts non-resource errors to DOMAIN ERRORs (this value is always 0)
If an object named in R is a variable, the corresponding row in the result is all 0. If an object named in R is a primitive or system function, the corresponding row in the result is 1 1 1 0. If an object named in R is a function array, train, or magic function, the corresponding row in the result is 0 1 1 0.If L is 4, the result describes the Object Size of the objects named in R and has two columns consisting of
[1] The object's size consisting of the object header and data sizes
[2] The object's data size only.
If L is 10, the result describes the Function Type of the objects named in R. The values in the result are integer scalars one per name in R and have the following meaning:
0 The object is not a function/operator/hyperator 1 The object is a Primitive Function, Operator, or Hyperator f←+ f←/ 2 The object is a Derived Function, Operator, or Hyperator f←+/ f←⍨∘÷ 3 The object is a User-defined Function, Operator, or Hyperator ∇f ∇(LO f) R ∇(LO (LH f RH)) R 4 The object is a System Function, Operator, or Hyperator f←⎕NL 5 The object is an Anonymous Function, Operator, or Hyperator f←{⍺+⍵} f←{⍺⍺/¨⍵} f←{⍺⍺⍺⍨⍺⍺/¨⍵} 6 The object is a Train f←(+/÷≢) 7 The object is a Name-Associated Function Not as yet implemented 8 The object is a Java-Associated Function Not as yet implemented
Examples
⎕AT - Quad AT - Object Summary Attributes - sample dyadic calls (re workspace user-function attributes):
2 ⎕AT ⊃'UCase' 'LCase' ⍝ Request to show 'Date/Time last modified' Attribute for two workspace functions 2015 2 4 0 23 55 926 ⍝ Yr Mo Day Hr Min Sec Milli-Secs format - same format as ⎕TS (quad time stamp) 2015 2 4 0 23 37 839 X←⊃'UCase' 'LCase' ⍴X 2 5 X UCase LCase (1 ⎕AT X),'|',(2 ⎕AT X),'|',(3 ⎕AT X),'|',(4 ⎕AT X),'|',(10 ⎕AT X) 1 1 0 0 | 2015 2 4 0 23 55 926 | 0 0 0 0 | 19626 6434 | 3 1 1 0 0 | 2015 2 4 0 23 37 839 | 0 0 0 0 | 18424 6448 | 3 ⍝ 1 1 0 0 = {Yes Explicit Function Result Z} {Monadic Function Valence} {Non-Operator} {Non-Hyperator} : 1 ⎕AT fcn-names ⍝ UTC/GMT Date/Time last edited-saved : 2 ⎕AT fcn-names ⍝ 0 0 0 0 = {Non-displayable (0), Non-suspendable (0), Ignores weak interrupts (0), Always zero (0)} : 3 ⎕AT fcn-names ⍝ 19626 6434 = {object header and data sizes, # bytes} {data size only, # bytes} : 4 ⎕AT fcn-names ⍝ 3 = {Function Type = User-Defined Function/Operator/Hyperator} : 10 ⎕AT fcn-names ⍝ BE ADVISED: 2 ⎕AT for each object will be in UTC/GMT time (ditto ⎕VR) while ⎕TS will be in local time (e.g. Eastern or Pacific time), ⍝ so for comparisons between (2 ⎕AT functions v. ⎕TS) you have to add or subtract n hours from one or the other for equivalency!
See Also: Quad Time Stamp ⎕TS for 7-element DateTime stamp format.
Note: ⎕AT is a 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 | ||||||||||||||
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:Dyadic p[erators]]