System WSID: Difference between revisions
No edit summary |
(t/c) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<h1> | <h1><aplxx>⎕WSID</aplxx> - Set or retrieve Workspace ID<br/><br/> | ||
<aplxx>)WSID</aplxx> - Display or Name the Current Workspace</h1> | |||
<table border="1" cellpadding="5" cellspacing="0" rules="none" summary=""> | |||
<tr> | |||
< | <td> | ||
<table border="0" cellpadding="5" cellspacing="0" summary=""> | |||
<tr> | |||
<td valign="top"><apll>Z←⎕WSID</apll></td> | |||
<td></td> | |||
<td></td> | |||
<td>returns the current file name of the workspace.</td> | |||
</tr> | |||
<tr> | |||
<td><apll>Z</apll> is a character vector.</td> | |||
</tr> | |||
<tr> | |||
<td valign="top"><apll>⎕WSID{assign}R</apll></td> | |||
<td></td> | |||
<td></td> | |||
<td>sets the name of the workspace to the value of <apll>R</apll>.</td> | |||
</tr> | |||
<tr> | |||
<td colspan=4><hr/></td> | |||
</tr> | |||
<tr> | |||
<td valign="top"><apll>)WSID</apll></td> | |||
<td></td> | |||
<td></td> | |||
<td>displays the current workspace name or CLEAR WS.</td> | |||
</tr> | |||
<tr> | |||
<td valign="top"><apll>)WSID name</apll></td> | |||
<td></td> | |||
<td></td> | |||
<td>Sets the workspace name to ''name''. The prior name is displayed</td> | |||
</tr> | |||
</table> | |||
</td> | |||
</tr> | |||
</table> | |||
<br /> | <br /> | ||
When you begin using an APL interpreter, the Session Manager presents you with a blank screen, and your workspace has a blank name, it's known as a CLEAR WS. In order to be able to save your workspace, you must give it a name. You can do this without saving the workspace, by issuing a <apll>)WSID</apll> command followed by the workspace name, or assigning the name to the <apll>⎕WSID</apll> system variable. You can also name the workspace with the [[System Command SAVE|)SAVE]] command. | |||
For a clear WS, <apll>⎕WSID</apll> returns an empty vector; for a named WS, returns the full file name of the current workspace. | |||
<apll> | |||
< | Issuing the <apll>)WSID</apll> command without an argument lists the current name of the workspace. Otherwise it changes the name of the workspace to the argument and reports the prior name. Because a space is a value separator, in order to give a workspace a name with spaces in it through the <apll>)WSID</apll> command, you must enclose it in double quote marks. Without the double quote marks, the name will be chopped at the first space; underlines may be used instead. Case is preserved on the <apll>)WSID</apll> or <apll>⎕WSID</apll> argument. | ||
NARS2000 will not validate the string passed to <apll>)WSID</apll> nor to <apll>⎕WSID</apll> — you must be certain it is a valid file name. A workspace name specified by the <apll>⎕WSID</apll> system variable may include spaces; the <apll>)WSID</apll> command requires the workspace name to be enclosed in double quote marks. | |||
This example is from Windows 7: | |||
<apll><pre> | |||
)wsid | |||
IS CLEAR WS | |||
)WSID | |||
IS CLEAR WS | |||
⎕WSID | |||
)wsid / {comment} Note this is a bad name | |||
WAS CLEAR WS | |||
)wsid | |||
IS / | |||
)wsid big | |||
WAS / | |||
)wsid hello there | |||
IS | WAS big | ||
)wsid | |||
WAS | IS hello | ||
)wsid "hello there" | |||
WAS big | WAS hello | ||
)wsid | |||
IS hello | IS hello there | ||
)wsid x_5 | |||
WAS hello | WAS hello | ||
)wsid | |||
IS x_5 | IS x_5 | ||
)Wsid Mixed_Case | |||
WAS x_5 | WAS x_5 | ||
)wsid | |||
IS Mixed_Case | IS Mixed_Case | ||
)wsid april | |||
</ | WAS Mixed_Case | ||
⎕wsid | |||
C:\Users\Programmer\AppData\Roaming\NARS2000\workspaces\april | |||
)wsid | |||
IS april | |||
⎕wsid←'March' | |||
)wsid | |||
IS March | |||
⎕wsid | |||
C:\Users\Programmer\AppData\Roaming\NARS2000\workspaces\March | |||
⎕wsid←'This is My Workspace' | |||
)wsid | |||
IS This is My Workspace | |||
⎕wsid | |||
C:\Users\Programmer\AppData\Roaming\NARS2000\workspaces\This is My Workspace | |||
)WSID "This is mine" | |||
WAS This is My Workspace | |||
⎕WSID | |||
C:\Users\Programmer\AppData\Roaming\NARS2000\workspaces\This is mine | |||
)wsid | |||
IS This is mine</pre></apll> | |||
{{Commands}} | {{System Variables}} | ||
{{ | {{Commands|WSID}} | ||
{{Article footer|0|NO}} | |||
[[Category:System variables]] |
Latest revision as of 15:55, 13 October 2019
⎕WSID - Set or retrieve Workspace ID
)WSID - Display or Name the Current Workspace
|
When you begin using an APL interpreter, the Session Manager presents you with a blank screen, and your workspace has a blank name, it's known as a CLEAR WS. In order to be able to save your workspace, you must give it a name. You can do this without saving the workspace, by issuing a )WSID command followed by the workspace name, or assigning the name to the ⎕WSID system variable. You can also name the workspace with the )SAVE command.
For a clear WS, ⎕WSID returns an empty vector; for a named WS, returns the full file name of the current workspace.
Issuing the )WSID command without an argument lists the current name of the workspace. Otherwise it changes the name of the workspace to the argument and reports the prior name. Because a space is a value separator, in order to give a workspace a name with spaces in it through the )WSID command, you must enclose it in double quote marks. Without the double quote marks, the name will be chopped at the first space; underlines may be used instead. Case is preserved on the )WSID or ⎕WSID argument.
NARS2000 will not validate the string passed to )WSID nor to ⎕WSID — you must be certain it is a valid file name. A workspace name specified by the ⎕WSID system variable may include spaces; the )WSID command requires the workspace name to be enclosed in double quote marks.
This example is from Windows 7:
)wsid IS CLEAR WS )WSID IS CLEAR WS ⎕WSID )wsid / ⍝ Note this is a bad name WAS CLEAR WS )wsid IS / )wsid big WAS / )wsid hello there WAS big )wsid IS hello )wsid "hello there" WAS hello )wsid IS hello there )wsid x_5 WAS hello )wsid IS x_5 )Wsid Mixed_Case WAS x_5 )wsid IS Mixed_Case )wsid april WAS Mixed_Case ⎕wsid C:\Users\Programmer\AppData\Roaming\NARS2000\workspaces\april )wsid IS april ⎕wsid←'March' )wsid IS March ⎕wsid C:\Users\Programmer\AppData\Roaming\NARS2000\workspaces\March ⎕wsid←'This is My Workspace' )wsid IS This is My Workspace ⎕wsid C:\Users\Programmer\AppData\Roaming\NARS2000\workspaces\This is My Workspace )WSID "This is mine" WAS This is My Workspace ⎕WSID C:\Users\Programmer\AppData\Roaming\NARS2000\workspaces\This is mine )wsid IS This is mine
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 |
System Commands (not case sensitive) | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
)CLEAR | )CLOSE | )COPY | )DROP | )EDIT | )ERASE | )EXIT | )FNS | )FOP | )FOPS | ||||
)IN | )INASCII | )LIB | )LOAD | )NEWTAB | )NMS | )OFF | )OPEN | )OPS | )OUT | ||||
)RESET | )SAVE | )SI | )SIC | )SINL | )SYMB | )ULIB | )VARS | )XLOAD | )WSID |
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 |