diff --git a/compiler-user-guide/docs/introduction/changes-to-behaviour.md b/compiler-user-guide/docs/introduction/changes-to-behaviour.md
index 59071f7f42a..b8b2a5de40c 100644
--- a/compiler-user-guide/docs/introduction/changes-to-behaviour.md
+++ b/compiler-user-guide/docs/introduction/changes-to-behaviour.md
@@ -8,7 +8,7 @@ Thread switching will not occur between lines of code after a function has been
## Error Trapping
-Compiled functions cannot be suspended. Errors occurring within compiled functions are signalled back to the calling environment (in the same way as if [`⎕SIGNAL`](../../../language-reference-guide/system-functions/signal) had been used inside the function).
+Compiled functions cannot be suspended. Errors occurring within compiled functions are signalled back to the calling environment (in the same way as if [`⎕SIGNAL`](../../../language-reference-guide/system-functions/signal-monadic) had been used inside the function).
Similarly, when an error in a compiled function is handled by an Execute trap, the APL expression specified in the trap will be executed in the calling environment and will not be able to see any of the compiled function's local names.
diff --git a/dotnet-interface-guide/docs/apl-source-files.md b/dotnet-interface-guide/docs/apl-source-files.md
index 700182e6446..021de5f36aa 100644
--- a/dotnet-interface-guide/docs/apl-source-files.md
+++ b/dotnet-interface-guide/docs/apl-source-files.md
@@ -183,7 +183,7 @@ This is compiled to a Windows executable (**.exe**) using **make.bat** and run f
### Defining Namespaces
-At least one namespace must be specified in an APL Source file. Namespaces are specified in an APL Source file using the `:Namespace` and `:EndNamespace` statements. Although you can use [`⎕NS`](../../language-reference-guide/system-functions/ns/) and [`⎕CS`](../../language-reference-guide/system-functions/cs/) within functions inside an APL Source file, you should not use these system functions outside function bodies; such use is not prevented, but the results will be unpredictable.
+At least one namespace must be specified in an APL Source file. Namespaces are specified in an APL Source file using the `:Namespace` and `:EndNamespace` statements. Although you can use [`⎕NS`](../../language-reference-guide/system-functions/ns-dyadic/) and [`⎕CS`](../../language-reference-guide/system-functions/cs/) within functions inside an APL Source file, you should not use these system functions outside function bodies; such use is not prevented, but the results will be unpredictable.
`:Namespace Name` introduces a new namespace relative to the current namespace called `Name`.
diff --git a/interface-guide/docs/introduction/concepts.md b/interface-guide/docs/introduction/concepts.md
index 41203dbd6dd..ca6e40c0a6e 100644
--- a/interface-guide/docs/introduction/concepts.md
+++ b/interface-guide/docs/introduction/concepts.md
@@ -113,10 +113,10 @@ The Dyalog APL GUI is implemented by the following system functions :
|--------------------------------------------------------------|---------------|--------------------------------------------|
|[`⎕DQ`](../../../language-reference-guide/system-functions/dq)|Dequeue |processes user actions, invoking callbacks |
-|[`⎕NQ`](../../../language-reference-guide/system-functions/nq)|Enqueue |generates an event under program control |
-|[`⎕WC`](../../../language-reference-guide/system-functions/wc)|Create Object |creates new object with specified properties|
-|[`⎕WG`](../../../language-reference-guide/system-functions/wg)|Get Properties |gets values of properties from an object |
-|[`⎕WN`](../../../language-reference-guide/system-functions/wn)|Object Names |reports names of all children of an object |
-|[`⎕WS`](../../../language-reference-guide/system-functions/ws)|Set Properties |sets values of properties for an object |
+|[`⎕NQ`](../../../language-reference-guide/system-functions/nq-monadic)|Enqueue |generates an event under program control |
+|[`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic)|Create Object |creates new object with specified properties|
+|[`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic)|Get Properties |gets values of properties from an object |
+|[`⎕WN`](../../../language-reference-guide/system-functions/wn-monadic)|Object Names |reports names of all children of an object |
+|[`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic)|Set Properties |sets values of properties for an object |
GUI Objects are a special type of *namespace* and have a name class of 9. They may therefore be managed like any other workspace object. This means that they can be localised in function headers and erased with `⎕EX`. GUI objects are saved with your workspace and reappear when it is loaded or copied.
diff --git a/language-reference-guide/docs/primitive-functions/dyadic-execute.md b/language-reference-guide/docs/primitive-functions/dyadic-execute.md
index 8e4be59fe54..2bc829f3fd7 100644
--- a/language-reference-guide/docs/primitive-functions/dyadic-execute.md
+++ b/language-reference-guide/docs/primitive-functions/dyadic-execute.md
@@ -8,8 +8,8 @@ search:
!!! Warning "Warning"
If the right argument to _dyadic execute_ could include user input, then there is a risk to data and systems. To reduce this risk, a system function might be more appropriate than the _dyadic execute_ function. For example:
- * use [`⎕VGET`](../system-functions/vget.md) or [`⎕VSET`](../system-functions/vset.md) to get or set the value of one or more variables named within one or more character vectors.
- * use [`⎕VFI`](../system-functions/vfi.md), [`⎕JSON`](../system-functions/json.md), or [`⎕CSV`](../system-functions/csv.md) to make numbers in text form into actual numbers.
+ * use [`⎕VGET`](../system-functions/vget-monadic.md) or [`⎕VSET`](../system-functions/vset-monadic.md) to get or set the value of one or more variables named within one or more character vectors.
+ * use [`⎕VFI`](../system-functions/vfi-monadic.md), [`⎕JSON`](../system-functions/json-monadic.md), or [`⎕CSV`](../system-functions/csv-monadic.md) to make numbers in text form into actual numbers.
* use [`⎕OR`](../system-functions/or.md) to call a function by name; exact usage depends on valency. For example, in the namespace with the reference `nsRef`:
* niladic – `(nsRef.⎕OR fnName)nsRef.{⍺⍺})⍬`
* monadic – `(nsRef.⎕OR fnName)nsRef.{⍺⍺ ⍵}Y`
diff --git a/language-reference-guide/docs/primitive-functions/execute.md b/language-reference-guide/docs/primitive-functions/execute.md
index ff4649a0cb2..83f26d29044 100644
--- a/language-reference-guide/docs/primitive-functions/execute.md
+++ b/language-reference-guide/docs/primitive-functions/execute.md
@@ -8,8 +8,8 @@ search:
!!! Warning "Warning"
If the argument to _execute_ could include user input, then there is a risk to data and systems. To reduce this risk, a system function might be more appropriate than the _execute_ function. For example:
- * use [`⎕VGET`](../system-functions/vget.md) or [`⎕VSET`](../system-functions/vset.md) to get or set the value of one or more variables named within one or more character vectors.
- * use [`⎕VFI`](../system-functions/vfi.md), [`⎕JSON`](../system-functions/json.md), or [`⎕CSV`](../system-functions/csv.md) to make numbers in text form into actual numbers.
+ * use [`⎕VGET`](../system-functions/vget-monadic.md) or [`⎕VSET`](../system-functions/vset-monadic.md) to get or set the value of one or more variables named within one or more character vectors.
+ * use [`⎕VFI`](../system-functions/vfi-monadic.md), [`⎕JSON`](../system-functions/json-monadic.md), or [`⎕CSV`](../system-functions/csv-monadic.md) to make numbers in text form into actual numbers.
* use [`⎕OR`](../system-functions/or.md) to call a function by name; exact usage depends on valency. For example:
* niladic – `(⎕OR fnName){⍺⍺}`
* monadic – `(⎕OR fnName){⍺⍺ ⍵}YY`
diff --git a/language-reference-guide/docs/primitive-operators/i-beam/compiler-control.md b/language-reference-guide/docs/primitive-operators/i-beam/compiler-control.md
index b1b202089cc..003f1c50129 100644
--- a/language-reference-guide/docs/primitive-operators/i-beam/compiler-control.md
+++ b/language-reference-guide/docs/primitive-operators/i-beam/compiler-control.md
@@ -89,7 +89,7 @@ The result `R` is a multi-line string (that is, a character vector with embedded
The namespace `N` can contain any or all of following callback functions:
- `N.quadNC` – analogous to the system function [`⎕NC`](../../system-functions/nc.md). When applied monadically to an enclosed character vector it returns the detailed nameclass of that name. For example, given the name of a global dfn it returns the value `3.2`.
-- `N.quadAT` – analogous to the system function [`⎕AT`](../../system-functions/at.md). When applied monadically to an enclosed character vector it returns a 1 by 4 matrix whose first item is a vector of 3 integers describing (respectively) the result, function valence, and operator valence of the name.
+- `N.quadAT` – analogous to the system function [`⎕AT`](../../system-functions/at-monadic.md). When applied monadically to an enclosed character vector it returns a 1 by 4 matrix whose first item is a vector of 3 integers describing (respectively) the result, function valence, and operator valence of the name.
- `N.getValue` – used to obtain the name of a global constant. When applied monadically to a character vector that is a global constant it returns the enclose of the constant value, otherwise it returns `⍬`.
Each of these callback functions returns information about names that should be guaranteed to exist when the compiled functions are executed. The compiler assumes that the information returned by the callbacks is correct, and generates bytecode accordingly. In the case of `quadNC` and `quadAT`, if the information returned by the callbacks turns out not to be correct when the compiled function is executed, then a runtime error is generated.
diff --git a/language-reference-guide/docs/primitive-operators/i-beam/disable-component-checksum-validation.md b/language-reference-guide/docs/primitive-operators/i-beam/disable-component-checksum-validation.md
index 7c174126b57..07f046b8e58 100644
--- a/language-reference-guide/docs/primitive-operators/i-beam/disable-component-checksum-validation.md
+++ b/language-reference-guide/docs/primitive-operators/i-beam/disable-component-checksum-validation.md
@@ -6,7 +6,7 @@ search:
# Disable Component Checksum Validation `{R}←3002⌶Y`{{key}}
-Checksums allow component files to be validated and repaired using [`⎕FCHK`](../../system-functions/fchk.md).
+Checksums allow component files to be validated and repaired using [`⎕FCHK`](../../system-functions/fchk-monadic.md).
From Version 13.1 onwards, components which contain checksums are also validated on every component read.
diff --git a/language-reference-guide/docs/primitive-operators/i-beam/json-translate-name.md b/language-reference-guide/docs/primitive-operators/i-beam/json-translate-name.md
index 3b1fd89659a..b465eb64c99 100644
--- a/language-reference-guide/docs/primitive-operators/i-beam/json-translate-name.md
+++ b/language-reference-guide/docs/primitive-operators/i-beam/json-translate-name.md
@@ -36,7 +36,7 @@ foo
```
-For further details, see [JSON Name Mangling](../../system-functions/json.md).
+For further details, see [JSON Name Mangling](../../system-functions/json-monadic.md).
diff --git a/language-reference-guide/docs/primitive-operators/i-beam/list-loaded-files.md b/language-reference-guide/docs/primitive-operators/i-beam/list-loaded-files.md
index 862b3503606..a0d247fb8a3 100644
--- a/language-reference-guide/docs/primitive-operators/i-beam/list-loaded-files.md
+++ b/language-reference-guide/docs/primitive-operators/i-beam/list-loaded-files.md
@@ -20,7 +20,7 @@ The editor may be used to edit Dyalog script files (*.dyalog* files) and general
|4 |Newline |
|5 |Flags |
-Encoding, newline and flags are defined the same as for `⎕NGET`. See [File Encodings](../../system-functions/nget.md). Checksum is an 8-character hexadecimal value, see [GetBuildID](../../../../object-reference/methodorevents/getbuildid) for more information.
+Encoding, newline and flags are defined the same as for `⎕NGET`. See [File Encodings](../../system-functions/nget-dyadic.md). Checksum is an 8-character hexadecimal value, see [GetBuildID](../../../../object-reference/methodorevents/getbuildid) for more information.
Examples
```apl
diff --git a/language-reference-guide/docs/primitive-operators/i-beam/list-shared-code-files-attached-names.md b/language-reference-guide/docs/primitive-operators/i-beam/list-shared-code-files-attached-names.md
index d5185e37ee9..28b6672f4ad 100644
--- a/language-reference-guide/docs/primitive-operators/i-beam/list-shared-code-files-attached-names.md
+++ b/language-reference-guide/docs/primitive-operators/i-beam/list-shared-code-files-attached-names.md
@@ -29,7 +29,7 @@ The rows of the matrix (one row for each shared code file) are ordered to corres
Lists the names in the shared code file identified by the specified memory address.
-`Y` is an integer vector that would be a valid right argument to [`⎕NL`](../../../system-functions/nl/); it identifies the nameclasses and subclasses for which the names should be listed.
+`Y` is an integer vector that would be a valid right argument to [`⎕NL`](../../../system-functions/nl-monadic/); it identifies the nameclasses and subclasses for which the names should be listed.
`X` is the slot identifier (an integer in the range 1-8) for the unique fixed virtual memory address of the shared code file.
diff --git a/language-reference-guide/docs/primitive-operators/i-beam/update-function-time-and-user-stamp.md b/language-reference-guide/docs/primitive-operators/i-beam/update-function-time-and-user-stamp.md
index e2c1d9254de..d6705791aed 100644
--- a/language-reference-guide/docs/primitive-operators/i-beam/update-function-time-and-user-stamp.md
+++ b/language-reference-guide/docs/primitive-operators/i-beam/update-function-time-and-user-stamp.md
@@ -6,7 +6,7 @@ search:
#
Update Function Time and User Stamp `{R}←X(1159⌶)Y`{{key}}
-`Y` is an array of function names in the same format as the right argument of `⎕AT`. For further information, see [Attributes](../../system-functions/at.md).
+`Y` is an array of function names in the same format as the right argument of `⎕AT`. For further information, see [Attributes](../../system-functions/at-monadic.md).
`X` is an array of function attributes in the same format as the output of `⎕AT`.
diff --git a/language-reference-guide/docs/system-commands/objects.md b/language-reference-guide/docs/system-commands/objects.md
index de1761bb12e..101162f2190 100644
--- a/language-reference-guide/docs/system-commands/objects.md
+++ b/language-reference-guide/docs/system-commands/objects.md
@@ -2,7 +2,7 @@
#
List Global Namespaces `)OBJECTS {nm}`
-This command displays the names of global **namespaces** in the active workspace. Names are displayed in the [`AV`](../system-functions/av.md) collating order. If a name is included after the command, only those names starting at or after the given name in collating order are displayed. Namespaces are objects created using [`⎕NS`](../system-functions/ns.md), [`)NS`](ns.md) or [`⎕WC`](../system-functions/wc.md) and have name class 9.
+This command displays the names of global **namespaces** in the active workspace. Names are displayed in the [`AV`](../system-functions/av.md) collating order. If a name is included after the command, only those names starting at or after the given name in collating order are displayed. Namespaces are objects created using [`⎕NS`](../system-functions/ns-dyadic.md), [`)NS`](ns.md) or [`⎕WC`](../system-functions/wc-dyadic.md) and have name class 9.
Note: [`)OBS`](obs.md) can be used as an **alternative** to `)OBJECTS`
diff --git a/language-reference-guide/docs/system-functions/at-disambiguation.md b/language-reference-guide/docs/system-functions/at-disambiguation.md
new file mode 100644
index 00000000000..a40c74d1daf
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/at-disambiguation.md
@@ -0,0 +1,22 @@
+---
+search:
+ exclude: true
+---
+
+#
Attributes `⎕AT`
+
+## Monadic `⎕AT` means
+
+[Object Attributes](at-monadic.md)
+```apl
+ ⎕AT 'plus'
+ 1 1 0 2026 7 30 15 20 38 0 0 Pete
+```
+
+## Dyadic `⎕AT` means
+
+[Object Attributes for APL2](at-dyadic.md)
+```apl
+ 1 ⎕AT 'plus'
+1 1 0
+```
diff --git a/language-reference-guide/docs/system-functions/at-dyadic.md b/language-reference-guide/docs/system-functions/at-dyadic.md
new file mode 100644
index 00000000000..0a9bc25678a
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/at-dyadic.md
@@ -0,0 +1,90 @@
+---
+search:
+ boost: 2
+---
+
+#
Object Attributes for APL2 `R←X ⎕AT Y`{{key}}
+
+`Y` can be a simple character scalar, vector or matrix, or a vector of character vectors representing the names of 0 or more defined functions or operators. This function closely emulates the APL2 implementation; for the form that returns information more appropriate to Dyalog APL, see [Object Attributes](at-monadic.md).
+
+`Y` specifies one or more names. If `Y` specifies a single name as a character scalar, a character vector, or as a scalar enclosed character vector, the result `R` is a vector. If `Y` specifies one or more names as a character matrix or as a vector of character vectors `R` is a matrix with one row per name in `Y`.
+
+It returns the same rank and shape result containing information that matches the APL2 implementation as closely as possible.
+
+The number of elements or columns in `R` and their meaning depends upon the value of `X` which may be 1, 2, 3 or 4.
+
+If `X` is 1, `R` specifies _valences_ and contains 3 elements (or columns) whose meaning is as follows:
+
+|---|----------------|---------------------------------------------------------------------------------------------------------------------------------------|
+|1 |Explicit result |1 if the object has an explicit result or is a variable 0 otherwise |
+|2 |Function valence|0 if the object is a niladic function or not a function 1 if the object is a monadic function 2 if the object is an ambivalent function|
+|3 |Operator valence|0 if the object is not an operator 1 if the object is a monadic operator 2 if the object is a dyadic operator |
+
+
Examples
+
+The following values correspond to the syntax shown alongside:
+
+|-----|--------|
+| `0 0 0` | `∇ FOO` |
+| `1 0 0` | `∇ Z←FOO` |
+| `1 0 0` | `∇ {Z}←FOO` |
+| `0 2 0` | `∇ {A} FOO B` |
+| `1 1 2` | `∇ {Z}←(F OP G)B` |
+
+If `X` is 2, `R` specifies _fix times_ (the time the object was last updated) for functions and operators named in `Y`. The time is reported as 7 integer elements (or columns) in the same form as `⎕TS`, whose meaning is as follows. The fix time reported for names in `Y` which are not defined functions or operators is 0.
+
+|---|-------------------------------------------|
+|1 |Year |
+|2 |Month |
+|3 |Day |
+|4 |Hour |
+|5 |Minute |
+|6 |Second |
+|7 |Milliseconds (this is always reported as 0)|
+
+If `X` is 3, `R` specifies _execution properties_ and contains 4 elements (or columns) whose meaning is as follows:
+
+|---|------------------------|---------------------------------------------------------------------------------------|
+|1 |Displayable |0 if the object is displayable 1 if the object is not displayable |
+|2 |Suspendable |0 if execution will suspend in the object 1 if execution will not suspend in the object|
+|3 |Weak Interrupt behaviour|0 if the object responds to interrupt 1 if the object ignores interrupt |
+|4 | |(always 0) |
+
+If `X` is 4, `R` specifies _object size_ and contains 2 elements (or columns) that both report the `⎕SIZE` of the object.
+
+
Examples
+
+```apl
+ ∇ {z}←{l}(fn myop)r
+
+[1] ...
+
+ ∇ z←foo
+
+[1] ...
+
+ ∇ z←{larg}util rarg
+
+[1] ...
+
+ ⎕LOCK'foo'
+
+ util2←util
+
+ 1 ⎕AT 'myop' 'foo' 'util' 'util2'
+1 2 1
+1 0 0
+1 2 0
+1 2 0
+
+ 2 ⎕AT'myop' 'foo' 'util' 'util2'
+1996 8 2 2 13 56 0
+ 0 0 0 0 0 0 0
+1996 3 1 14 12 10 0
+1998 8 26 16 16 42 0
+```
+
+
+
+ ⎕AT
+
diff --git a/language-reference-guide/docs/system-functions/at-monadic.md b/language-reference-guide/docs/system-functions/at-monadic.md
new file mode 100644
index 00000000000..eccdd04e5b7
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/at-monadic.md
@@ -0,0 +1,92 @@
+---
+search:
+ boost: 2
+---
+
+#
Object Attributes `R←⎕AT Y`{{key}}
+
+`Y` can be a simple character scalar, vector or matrix, or a vector of character vectors representing the names of 0 or more defined functions or operators. This function returns information that is appropriate for Dyalog APL; for the form that emulates APL2, see [Object Attributes for APL2](at-dyadic.md).
+
+`Y` specifies one or more names. If `Y` specifies a single name as a character scalar, a character vector, or as a scalar enclosed character vector, the result `R` is a vector. If `Y` specifies one or more names as a character matrix or as a vector of character vectors `R` is a matrix with one row per name in `Y`.
+
+`R` is a 4-element vector or a 4 column matrix with the same number of rows as names in `Y` containing the following attribute information:
+
+`R[1]` or `R[;1]`: Each item specifies _valences_: a 3-element integer vector representing the function header syntax:
+
+|---|---|---|
+|1|Function result|0 if the function has no result 1 if the function has an explicit result `¯1` if the function has a shy result|
+|2|Function valence|0 if the object is a niladic function or not a function 1 if the object is a monadic function 2 if the object is a dyadic function `¯2` if the object is an ambivalent function|
+|3|Operator valence|0 if the object is not an operator 1 if the object is a monadic operator 2 if the object is a dyadic operator|
+
+
Example
+
+The following values correspond to the syntax shown alongside:
+
+|--------|--------|
+| `0 0 0` | `∇ FOO` |
+| `1 0 0` | `∇ Z←FOO` |
+| `¯1 0 0` | `∇ {Z}←FOO` |
+| `0 ¯2 0` | `∇ {A} FOO B` |
+| `¯1 1 2` | `∇ {Z}←(F OP G)B` |
+
+`R[2]` or `R[;2]`: Each item specifies _fix times_: the time the function was last fixed, reported as 7 integer elements in the same form as `⎕TS`. The fix time reported for names in `Y` which are not defined functions or operators is 0.
+
+|---|-------------------------------------------|
+|1 |Year |
+|2 |Month |
+|3 |Day |
+|4 |Hour |
+|5 |Minute |
+|6 |Second |
+|7 |Milliseconds (this is always reported as 0)|
+
+`R[3]` or `R[;3]`: Each item specifies _execution properties_: an integer reporting the current [`⎕LOCK`](lock-monadic.md) state of the function:
+
+|---|-------------------------|
+|`0`|Not locked |
+|`1`|Cannot display function |
+|`2`|Cannot suspend function |
+|`3`|Cannot display or suspend|
+
+`R[4]` or `R[;4]`: Each item specifies the _author_: a character vector - the user name of the user who last fixed (defined) the function.
+
+
Examples
+
+```apl
+ ∇ {z}←{l}(fn myop)r
+
+[1] ...
+
+ ∇ z←foo
+
+[1] ...
+
+ ∇ z←{larg}util rarg
+
+[1] ...
+
+ ⎕LOCK'foo'
+
+ util2←util
+
+ ]Display ⎕AT 'myop' 'foo' 'util' 'util2'
+┌→────────────────────────────────────────────┐
+↓ ┌→──────┐ ┌→─────────────────┐ ┌→───┐ │
+│ │¯1 ¯2 1│ │1996 8 2 2 13 56 0│ 0 │john│ │
+│ └~──────┘ └~─────────────────┘ └────┘ │
+│ ┌→────┐ ┌→────────────┐ ┌⊖┐ │
+│ │1 0 0│ │0 0 0 0 0 0 0│ 3 │ │ │
+│ └~────┘ └~────────────┘ └─┘ │
+│ ┌→─────┐ ┌→──────────────────┐ ┌→───┐ │
+│ │1 ¯2 0│ │1996 3 1 14 12 10 0│ 0 │pete│ │
+│ └~─────┘ └~──────────────────┘ └────┘ │
+│ ┌→─────┐ ┌→───────────────────┐ ┌→─────┐ │
+│ │1 ¯2 0│ │1998 8 26 16 16 42 0│ 0 │graeme│ │
+│ └~─────┘ └~───────────────────┘ └──────┘ │
+└∊────────────────────────────────────────────┘
+```
+
+
+
+ ⎕AT
+
diff --git a/language-reference-guide/docs/system-functions/at.md b/language-reference-guide/docs/system-functions/at.md
deleted file mode 100644
index 8c1b2ba74d3..00000000000
--- a/language-reference-guide/docs/system-functions/at.md
+++ /dev/null
@@ -1,116 +0,0 @@
----
-search:
- boost: 2
----
-
-#
Attributes `R←{X} ⎕AT Y`{{key}}
-
-`Y` can be a simple character scalar, vector or matrix, or a vector of character vectors representing the names of 0 or more defined functions or operators. Used dyadically, this function closely emulates the APL2 implementation. Used monadically, it returns information that is more appropriate for Dyalog APL.
-
-`Y` specifies one or more names. If `Y` specifies a single name as a character scalar, a character vector, or as a scalar enclosed character vector, the result `R` is a vector. If `Y` specifies one or more names as a character matrix or as a vector of character vectors `R` is a matrix with one row per name in `Y`.
-
-## Monadic Use
-
-If `X` is omitted, `R` is a 4-element vector or a 4 column matrix with the same number of rows as names in `Y` containing the following attribute information:
-
-`R[1]` or `R[;1]`: Each item is a 3-element integer vector representing the function header syntax:
-
-|---|---|---|
-|1|Function result|0 if the function has no result 1 if the function has an explicit result `¯1` if the function has a shy result|
-|2|Function valence|0 if the object is a niladic function or not a function 1 if the object is a monadic function 2 if the object is a dyadic function `¯2` if the object is an ambivalent function|
-|3|Operator valence|0 if the object is not an operator 1 if the object is a monadic operator 2 if the object is a dyadic operator|
-
-The following values correspond to the syntax shown alongside:
-```apl
-
- 0 0 0 ∇ FOO
- 1 0 0 ∇ Z←FOO
- ¯1 0 0 ∇ {Z}←FOO
- 0 ¯2 0 ∇ {A} FOO B
- ¯1 1 2 ∇ {Z}←(F OP G)B
-```
-
-`R[2]` or `R[;2]`: Each item is the (`⎕TS` form) timestamp of the time the function was last fixed.
-
-`R[3]` or `R[;3]`: Each item is an integer reporting the current `⎕LOCK` state of the function:
-
-|---|-------------------------|
-|`0`|Not locked |
-|`1`|Cannot display function |
-|`2`|Cannot suspend function |
-|`3`|Cannot display or suspend|
-
-`R[4]` or `R[;4]`: Each item is a character vector - the network ID of the user who last fixed (edited) the function.
-
-
Example
-```apl
-
- ∇ {z}←{l}(fn myop)r
-[1] ...
-
- ∇ z←foo
-[1] ...
-
- ∇ z←{larg}util rarg
-[1] ...
-
- ⎕LOCK'foo'
-
- util2←util
-```
-```apl
-
- ]Display ⎕AT 'myop' 'foo' 'util' 'util2'
-.→--------------------------------------------.
-↓ .→------. .→-----------------. .→---. |
-| |¯1 ¯2 1| |1996 8 2 2 13 56 0| 0 |john| |
-| '~------' '~-----------------' '----' |
-| .→----. .→------------. .⊖. |
-| |1 0 0| |0 0 0 0 0 0 0| 3 | | |
-| '~----' '~------------' '-' |
-| .→-----. .→------------------. .→---. |
-| |1 ¯2 0| |1996 3 1 14 12 10 0| 0 |pete| |
-| '~-----' '~------------------' '----' |
-| .→-----. .→-------------------. .→-----. |
-| |1 ¯2 0| |1998 8 26 16 16 42 0| 0 |graeme| |
-| '~-----' '~-------------------' '------' |
-'∊--------------------------------------------'
-```
-## Dyadic Use
-
-The dyadic form of `⎕AT` emulates APL2. It returns the same rank and shape result containing information that matches the APL2 implementation as closely as possible.
-
-The number of elements or columns in `R` and their meaning depends upon the value of `X` which may be 1, 2, 3 or 4.
-
-If `X` is 1, `R` specifies *valences* and contains 3 elements (or columns) whose meaning is as follows:
-
-|---|----------------|---------------------------------------------------------------------------------------------------------------------------------------|
-|1 |Explicit result |1 if the object has an explicit result or is a variable 0 otherwise |
-|2 |Function valence|0 if the object is a niladic function or not a function 1 if the object is a monadic function 2 if the object is an ambivalent function|
-|3 |Operator valence|0 if the object is not an operator 1 if the object is a monadic operator 2 if the object is a dyadic operator |
-
-If `X` is 2, `R` specifies *fix times* (the time the object was last updated) for functions and operators named in `Y`. The time is reported as 7 integer elements (or columns) whose meaning is as follows. The fix time reported for names in `Y` which are not defined functions or operators is 0.
-
-|---|-------------------------------------------|
-|1 |Year |
-|2 |Month |
-|3 |Day |
-|4 |Hour |
-|5 |Minute |
-|6 |Second |
-|7 |Milliseconds (this is always reported as 0)|
-
-If `X` is 3, `R` specifies *execution properties* and contains 4 elements (or columns) whose meaning is as follows:
-
-|---|------------------------|---------------------------------------------------------------------------------------|
-|1 |Displayable |0 if the object is displayable 1 if the object is not displayable |
-|2 |Suspendable |0 if execution will suspend in the object 1 if execution will not suspend in the object|
-|3 |Weak Interrupt behaviour|0 if the object responds to interrupt 1 if the object ignores interrupt |
-|4 | |(always 0) |
-
-If `X` is 4, `R` specifies *object size* and contains 2 elements (or columns) that both report the `⎕SIZE` of the object.
-
-
-
- ⎕AT
-
diff --git a/language-reference-guide/docs/system-functions/c-disambiguation.md b/language-reference-guide/docs/system-functions/c-disambiguation.md
new file mode 100644
index 00000000000..fdd604c30d5
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/c-disambiguation.md
@@ -0,0 +1,22 @@
+---
+search:
+ exclude: true
+---
+
+#
Case Convert `⎕C`
+
+## Monadic `⎕C` means
+
+[Case Fold](c-monadic.md)
+```apl
+ ⎕C 'Hello Ίσως'
+hello ίσωσ
+```
+
+## Dyadic `⎕C` means
+
+[Case Map](c-dyadic.md)
+```apl
+ 1 ⎕C 'Hello'
+HELLO
+```
diff --git a/language-reference-guide/docs/system-functions/c-dyadic.md b/language-reference-guide/docs/system-functions/c-dyadic.md
new file mode 100644
index 00000000000..5dacbfa053b
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/c-dyadic.md
@@ -0,0 +1,45 @@
+---
+search:
+ boost: 2
+---
+
+#
Case Map `R←X ⎕C Y`{{key}}
+
+`Y` is any array. `R` is an identical array except that character arrays within it are either folded for case-less comparison, or mapped to upper- or lowercase.
+
+For a discussion of case folding and case conversion (mapping), see [Character Properties, Case Mappings & Names FAQ](https://unicode.org/faq/casemap_charprop.html).
+
+The following cases are supported:
+
+|X|Description|
+|---|---|
+|`1`|`R` is a copy of `Y` with character arrays mapped to uppercase.|
+|`¯1`|`R` is a copy of `Y` with character arrays mapped to lowercase.|
+|`¯3`|`R` is a copy of `Y` with character arrays folded, for case-less comparison (this is equivalent to monadic [`⎕C`](c-monadic.md)).|
+
+
Examples
+```apl
+
+ 1 ⎕C 42 'Pete' 'Πέτρος'
+42 PETE ΠΈΤΡΟΣ
+ ¯1 ⎕C 42 'Pete' 'Πέτρος'
+42 pete πέτρος
+
+```
+
+Greek has two forms of lowercase Sigma, namely "σ" and "ς", but a single uppercase Sigma "Σ". Each lowercase form remains unchanged when mapped to lowercase, but both map to uppercase "Σ".
+```apl
+ 1 ⎕C 'ίσως'
+ΊΣΩΣ
+ ¯1 ⎕C 'ίσως'
+ίσως
+
+```
+
+!!! note
+ Refs in `Y` are not followed but just returned unchanged.
+
+
+
+ ⎕C
+
diff --git a/language-reference-guide/docs/system-functions/c-monadic.md b/language-reference-guide/docs/system-functions/c-monadic.md
new file mode 100644
index 00000000000..54d4bef08ec
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/c-monadic.md
@@ -0,0 +1,34 @@
+---
+search:
+ boost: 2
+---
+
+#
Case Fold `R←⎕C Y`{{key}}
+
+`Y` is any array. `R` is a copy of `Y` with character arrays folded, for case-less comparison.
+
+For a discussion of case folding and [case mapping](c-dyadic.md), see [Character Properties, Case Mappings & Names FAQ](https://unicode.org/faq/casemap_charprop.html).
+
+
Examples
+```apl
+
+ ⎕C 42 'Pete' 'Πέτρος'
+42 pete πέτροσ
+ (⊂'pete'){⍺≡⎕C ⍵}¨'PETE' 'Pete' 'pEte'
+1 1 1
+
+```
+
+Greek has two forms of lowercase Sigma, namely "σ" and "ς", but a single uppercase Sigma "Σ". Each lowercase form remains unchanged when mapped to lowercase, but both fold to "σ", while "Σ" is mapped to lowercase "σ".
+```apl
+ ⎕C 'ίσως'
+ίσωσ
+```
+
+!!! note
+ Refs in `Y` are not followed but just returned unchanged.
+
+
+
+ ⎕C
+
diff --git a/language-reference-guide/docs/system-functions/c.md b/language-reference-guide/docs/system-functions/c.md
deleted file mode 100644
index 3bd0de7c089..00000000000
--- a/language-reference-guide/docs/system-functions/c.md
+++ /dev/null
@@ -1,56 +0,0 @@
----
-search:
- boost: 2
----
-
-#
Case Convert `R←{X}⎕C Y`{{key}}
-
-`Y` is any array. `R` is an identical array except that character arrays within it are either folded for case-less comparison, or mapped to upper or lower case.
-
-For a discussion of case folding and case conversion (mapping), see [Character Properties, Case Mappings & Names FAQ](https://unicode.org/faq/casemap_charprop.html).
-
-If the optional left-argument `X` is omitted, `R` is a copy of `Y` with character arrays folded, for case-less comparison.
-
-If `X` is specified, the following cases are supported:
-
-|X |Description |
-|----|----------------------------------------------------------------------------------------------------------------|
-|`1` |`R` is a copy of `Y` with character arrays mapped to upper case. |
-|`¯1`|`R` is a copy of `Y` with character arrays mapped to lower case. |
-|`¯3`|`R` is a copy of `Y` with character arrays folded, for case-less comparison (this is equivalent to monadic use).|
-
-
Examples
-```apl
-
- ⎕C 42 'Pete' 'Πέτρος'
-42 pete πέτροσ
- 1 ⎕C 42 'Pete' 'Πέτρος'
-42 PETE ΠΈΤΡΟΣ
- ¯1 ⎕C 42 'Pete' 'Πέτρος'
-42 pete πέτρος
-
- (⊂'pete'){⍺≡⎕C ⍵}¨'PETE' 'Pete' 'pEte'
-1 1 1
-
-```
-
-
Example
-
-Greek has two forms of lower-case Sigma, namely "σ" and "ς" but a single upper-case Sigma "Σ". Each lower-case form remains unchanged when mapped to lower-case, but both fold to "σ", while "Σ" is mapped to lower-case "σ" .
-```apl
- ⎕C 'ίσως'
-ίσωσ
- 1 ⎕C 'ίσως'
-ΊΣΩΣ
- ¯1⎕C 1 ⎕C 'ίσως'
-ίσωσ
-
-```
-
-!!! note
- Refs in `Y` are not followed but just returned unchanged.
-
-
-
- ⎕C
-
diff --git a/language-reference-guide/docs/system-functions/class-disambiguation.md b/language-reference-guide/docs/system-functions/class-disambiguation.md
new file mode 100644
index 00000000000..3e4e0c371c4
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/class-disambiguation.md
@@ -0,0 +1,45 @@
+---
+search:
+ exclude: true
+---
+
+#
Class `⎕CLASS`
+
+## Monadic `⎕CLASS` means
+
+[Class Hierarchy](class-monadic.md)
+```apl
+ :Class base
+ :EndClass
+ :Interface iface
+ :EndInterface
+ :Class derived : base, iface
+ :EndClass
+ ⎕CLASS derived
+┌────────────────────┬────────┐
+│ #.derived #.iface │ #.base │
+└────────────────────┴────────┘
+```
+
+## Dyadic `⎕CLASS` means
+
+[Get Class/Interface Implementation](class-dyadic.md)
+```apl
+ :Class Animal
+ ∇ r←Speak
+ :Access public
+ r←'Some generic noise'
+ ∇
+ :EndClass
+ :Class Dog : Animal
+ ∇ r←Speak
+ :Access public
+ r←'Woof'
+ ∇
+ :EndClass
+ rex←⎕NEW Dog
+ rex.Speak
+Woof
+ (Animal ⎕CLASS rex).Speak
+Some generic noise
+```
diff --git a/language-reference-guide/docs/system-functions/class-dyadic.md b/language-reference-guide/docs/system-functions/class-dyadic.md
new file mode 100644
index 00000000000..f3f81a07fc0
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/class-dyadic.md
@@ -0,0 +1,52 @@
+---
+search:
+ boost: 2
+---
+
+#
Get Class/Interface Implementation `R←X ⎕CLASS Y`{{key}}
+
+Dyadic `⎕CLASS` returns a reference to the implementation of interface `X` by instance `Y`, or to the implementation of (base) class `X` by instance `Y`, and is used as a _cast_ in order to access members of `Y` that correspond to members of interface or (base) class `X`.
+
+To access the _entire_ class hierarchy of a class, use [monadic `⎕CLASS`](class-monadic.md).
+
+`Y` must be a reference to an instance of a class and `X` is a reference to an interface that is supported by instance `Y` or to a class upon which instance `Y` is based.
+
+
Examples
+
+The [Penguin class example](../../../programming-reference-guide/object-oriented-programming/interfaces/interface-example) is used to illustrate the use of interfaces.
+
+```apl
+ Pingo←⎕NEW Penguin
+ (FishBehaviour ⎕CLASS Pingo).Swim
+I can dive and swim like a fish
+ (BirdBehaviour ⎕CLASS Pingo).Fly
+Although I am a bird, I cannot fly
+ (BirdBehaviour ⎕CLASS Pingo).Lay
+I lay one egg every year
+ (BirdBehaviour ⎕CLASS Pingo).Sing
+Croak, Croak!
+```
+
+The next example illustrates the use of dyadic `⎕CLASS` to cast an instance to a lower class and thereby access a member in the lower class that has been superseded by another class higher in the tree.
+
+```apl
+ Polly←⎕NEW DomesticParrot
+ Polly.Speak
+Squark! Who's a pretty boy, then!
+```
+
+Note that the `Speak` method invoked above is the `Speak` method defined by class `DomesticParrot`, which supersedes the `Speak` methods of sub-classes `Parrot` and `Bird`.
+
+You can use a cast to access the (superseded) `Speak` method in the sub-classes `Parrot` and `Bird`.
+
+```apl
+ (Parrot ⎕CLASS Polly).Speak
+Squark!
+ (Bird ⎕CLASS Polly).Speak
+Tweet, tweet!
+```
+
+
+
+ ⎕CLASS CLASS
+
diff --git a/language-reference-guide/docs/system-functions/class-monadic.md b/language-reference-guide/docs/system-functions/class-monadic.md
new file mode 100644
index 00000000000..97d0ecff207
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/class-monadic.md
@@ -0,0 +1,61 @@
+---
+search:
+ boost: 2
+---
+
+#
Class Hierarchy `R←⎕CLASS Y`{{key}}
+
+Monadic `⎕CLASS` returns a list of references to classes and interfaces that specifies the class hierarchy for the class or instance specified by `Y`.
+
+To instead access the lower level implementations of a class, use [dyadic `⎕CLASS`](class-dyadic.md).
+
+`Y` must be a reference to a class or to an instance of a class.
+
+`R` is a vector of vectors whose items represent nodes in the class hierarchy of `Y`. Each item of `R` is a vector whose first item is a class reference and whose subsequent items (if any) are references to the interfaces supported by that class.
+
+
Examples
+
+This example illustrates a simple inheritance tree or class hierarchy. There are 3 classes, namely:
+```apl
+Animal
+ Bird (derived from Animal)
+ Parrot (derived from Bird)
+
+:Class Animal
+...
+:EndClass ⍝ Animal
+
+:Class Bird: Animal
+...
+:EndClass ⍝ Bird
+
+:Class Parrot: Bird
+...
+:EndClass ⍝ Parrot
+
+```
+```apl
+ ⎕CLASS Eeyore←⎕NEW Animal
+ #.Animal
+ ⎕CLASS Robin←⎕NEW Bird
+ #.Bird #.Animal
+ ⎕CLASS Polly←⎕NEW Parrot
+ #.Parrot #.Bird #.Animal
+
+ ⎕CLASS¨ Parrot Animal
+ #.Parrot #.Bird #.Animal #.Animal
+```
+
+The [Penguin class example](../../../programming-reference-guide/object-oriented-programming/interfaces/interface-example) illustrates the use of interfaces.
+
+In this case, the `Penguin` class derives from `Animal` (as above) but additionally supports the `BirdBehaviour` and `FishBehaviour` interfaces, thereby inheriting members from both.
+```apl
+ Pingo←⎕NEW Penguin
+ ⎕CLASS Pingo
+ #.Penguin #.FishBehaviour #.BirdBehaviour #.Animal
+```
+
+
+
+ ⎕CLASS CLASS
+
diff --git a/language-reference-guide/docs/system-functions/class.md b/language-reference-guide/docs/system-functions/class.md
deleted file mode 100644
index 45f63f8dae8..00000000000
--- a/language-reference-guide/docs/system-functions/class.md
+++ /dev/null
@@ -1,107 +0,0 @@
----
-search:
- boost: 2
----
-
-#
Class `R←{X}⎕CLASS Y`{{key}}
-
-## Monadic Case
-
-Monadic `⎕CLASS` returns a list of references to Classes and Interfaces that specifies the class hierarchy for the Class or Instance specified by `Y`.
-
-`Y` must be a reference to a Class or to an Instance of a Class.
-
-`R` is a vector of vectors whose items represent nodes in the Class hierarchy of `Y`. Each item of `R` is a vector whose first item is a Class reference and whose subsequent items (if any) are references to the Interfaces supported by that Class.
-
-## Example 1
-
-This example illustrates a simple inheritance tree or Class hierarchy. There are 3 Classes, namely:
-```apl
-Animal
- Bird (derived from Animal)
- Parrot (derived from Bird)
-
-:Class Animal
-...
-:EndClass ⍝ Animal
-
-:Class Bird: Animal
-...
-:EndClass ⍝ Bird
-
-:Class Parrot: Bird
-...
-:EndClass ⍝ Parrot
-
-```
-```apl
- ⎕CLASS Eeyore←⎕NEW Animal
- #.Animal
- ⎕CLASS Robin←⎕NEW Bird
- #.Bird #.Animal
- ⎕CLASS Polly←⎕NEW Parrot
- #.Parrot #.Bird #.Animal
-
- ⎕CLASS¨ Parrot Animal
- #.Parrot #.Bird #.Animal #.Animal
-```
-
-### Example 2
-
-The Penguin Class example (see[Programmer's Guide: "Penguin Class Example"](../../../programming-reference-guide/object-oriented-programming/interfaces/interface-example)) illustrates the use of Interfaces.
-
-In this case, the `Penguin` Class derives from `Animal` (as above) but additionally supports the `BirdBehaviour` and `FishBehaviour` Interfaces, thereby inheriting members from both.
-```apl
- Pingo←⎕NEW Penguin
- ⎕CLASS Pingo
- #.Penguin #.FishBehaviour #.BirdBehaviour #.Animal
-```
-
-## Dyadic Case
-
-If `X` is specified, `Y` must be a reference to an Instance of a Class and `X` is a reference to an Interface that is supported by Instance `Y` or to a Class upon which Instance `Y` is based.
-
-In this case, `R` is a reference to the implementation of Interface `X` by Instance `Y`, or to the implementation of (Base) Class `X` by Instance `Y`, and is used as a *cast* in order to access members of `Y` that correspond to members of Interface of (Base) Class `X`.
-
-#### Example 1
-
-Once again, the Penguin Class example (see[Programmer's Guide: "Penguin Class Example"](../../../programming-reference-guide/object-oriented-programming/interfaces/interface-example)) is used to illustrate the use of Interfaces.
-```apl
- Pingo←⎕NEW Penguin
- ⎕CLASS Pingo
- #.Penguin #.FishBehaviour #.BirdBehaviour #.Animal
-
- (FishBehaviour ⎕CLASS Pingo).Swim
-I can dive and swim like a fish
- (BirdBehaviour ⎕CLASS Pingo).Fly
-Although I am a bird, I cannot fly
- (BirdBehaviour ⎕CLASS Pingo).Lay
-I lay one egg every year
- (BirdBehaviour ⎕CLASS Pingo).Sing
-Croak, Croak!
-```
-
-#### Example 2
-
-This example illustrates the use of dyadic `⎕CLASS` to cast an Instance to a lower Class and thereby access a member in the lower Class that has been superseded by another Class higher in the tree.
-```apl
- Polly←⎕NEW DomesticParrot
- Polly.Speak
-Squark! Who's a pretty boy, then!
-
-```
-
-Note that the `Speak` method invoked above is the `Speak` method defined by Class `DomesticParrot`, which supersedes the `Speak` methods of sub-classes `Parrot` and `Bird`.
-
-You may use a cast to access the (superseded) `Speak` method in the sub-classes `Parrot` and `Bird`.
-```apl
- (Parrot ⎕CLASS Polly).Speak
-Squark!
- (Bird ⎕CLASS Polly).Speak
-Tweet, tweet!
-```
-
-
-
- ⎕CLASS CLASS
-
diff --git a/language-reference-guide/docs/system-functions/csv-disambiguation.md b/language-reference-guide/docs/system-functions/csv-disambiguation.md
new file mode 100644
index 00000000000..b8d06029195
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/csv-disambiguation.md
@@ -0,0 +1,24 @@
+---
+search:
+ exclude: true
+---
+
+#
Comma Separated Values `⎕CSV`
+
+## Monadic `⎕CSV` means
+
+[Import CSV](csv-monadic.md)
+```apl
+ ⎕CSV ('1,2,3' '4,5,6') '' 2
+1 2 3
+4 5 6
+```
+
+## Dyadic `⎕CSV` means
+
+[Export CSV](csv-dyadic.md)
+```apl
+ (2 3⍴⍳6) ⎕CSV ''
+1,2,3
+4,5,6
+```
diff --git a/language-reference-guide/docs/system-functions/csv-dyadic.md b/language-reference-guide/docs/system-functions/csv-dyadic.md
new file mode 100644
index 00000000000..62b9160b6ec
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/csv-dyadic.md
@@ -0,0 +1,131 @@
+---
+search:
+ boost: 2
+---
+
+#
Export CSV `{R}←X ⎕CSV Y`{{key}}
+
+Dyadic `⎕CSV` exports Comma Separated Value (CSV) data to a CSV file, or converts data from an internal format to CSV format.
+
+To convert CSV data into an array, use [monadic `⎕CSV`](csv-monadic.md).
+
+`⎕CSV` output is not affected by [`⎕PP`](pp); numeric values are always represented with full precision.
+
+The left argument `X` is either:
+
+- a matrix or a vector of vectors/matrices containing the data to be converted to CSV format.
+- or a 2-element vector containing a matrix or vector of vectors/matrices containing the data to be converted to CSV format, and a vector of character vectors containing the header record.
+
+`Y` is a 1 or 2-element vector containing:
+
+|-----|---------------------------------------|
+|`[1]`|Destination of CSV Data (see below) |
+|`[2]`|Description of the CSV data (see below)|
+
+*Destination* - may be one of:
+
+- a character vector or scalar containing a file name
+- a native tie number
+- an empty character vector, indicating that the CSV data is to be returned in the result `R`
+
+*Description*
+
+If `Y[1]` is a file name or tie number, *Description* may be:
+
+- a character vector specifying the file encoding such as `'UTF-8'` (see [File Encodings](nget-dyadic.md)).
+- a 256-element numeric vector that maps each possible byte value (0-255) to a Unicode code point (1st element = Unicode code point corresponding to byte value 0, and so on). ¯1 indicates that the corresponding byte value is not mapped to any character. Apart from ¯1, no value may appear in the table more than once.
+
+If `Y[1]` is empty, *Description* may be a character scalar `'S'` (simple) or `'N'` (nested). If omitted, the default is `'S'`
+
+## Internal Format
+
+Arrays that are suitable for exporting as CSV data are represented by 3 possible structures:
+
+- A table (a matrix whose elements are character vectors or scalars, or numbers).
+- A vector, each of whose items contain field (column) values. Character field values are character matrices; numeric field values are numeric vectors.
+- A vector, each of whose items contain field (column) values. Character field values are vectors of character vectors; numeric field values are numeric vectors.
+
+## MetaCharacters
+
+Some characters in a CSV file are metacharacters that define the structure of the data; for example, the field separator character between fields. Characters that are not metacharacters are literal characters. The variant options QuoteChar, EscapeChar, and DoubleQuote make it possible to interpret metacharacters as literal characters, and thus permit fields to contain field separator characters, leading and trailing spaces, and line-endings.
+
+Fixed-width fields do not require these options and they are ignored if fixed-width fields are being processed.
+
+## Variant Options
+
+Dyadic `⎕CSV` may be applied using the _variant_ operator with the following options.
+
+|Name|Meaning|Default|
+|---|---|---|
+|Decimal|the decimal mark in numeric fields - one of `'.'` or `','`|`'.'`|
+|DoubleQuote|A Boolean which indicates whether (`1`) or not (`0`) a quote character within a quoted field is represented by two consecutive quote characters|`1`|
+|EscapeChar|The escape character, which may be specified as an empty character vector (meaning none is defined) or a character scalar|`0`|
+|ForceQuotes|A number specifying the degree to which quotes are applied around fields even if not strictly required. Possible values are:
- `0` – add only if required
- `1` – add to all fields containing character data and to fields containing numeric data if required
- `2` – add to all fields even if not required
If ForceQuotes is a scalar, the value applies to all columns; if it is a vector of values then each value applies to the corresponding column.|`0`|
+|IfExists|a character vector `'Error'` or `'Replace'` which specifies, when creating a named file which already exists, whether to overwrite it ( `'Replace'` ) or signal an error ( `'Error'` )|`'Error'`|
+|LineEnding|the line ending sequence - see [Line separators:](nget-monadic.md)|(13 10) on Windows; 10 on other platforms|
+|QuoteChar|The field quote character (delimiter), which may be specified as an empty character vector (meaning none is defined) or a character scalar|`"`|
+|Separator|the field separator, any single character. If Widths is other than `⍬` , Separator is ignored.|`','`|
+|Thousands|the thousands separator in numeric fields, which can be specified as an empty character vector (meaning no separator is defined) or a character scalar|`''`|
+|Trim|a Boolean specifying whether whitespace is trimmed at the beginning and end of character fields|`1`|
+|Widths|a vector of numeric values describing the width (in characters) of the corresponding columns in the CSV source, or `⍬` for variable width delimited fields|`⍬`|
+
+The Separator, QuoteChar, and EscapeChar characters, when defined, must be different. Other options defined for import are also accepted but ignored.
+
+The Overwrite variant option (Boolean) from Version 16.0 remains supported but is deprecated in favour of IfExists.
+
+### QuoteChar, EscapeChar, and DoubleQuote options
+
+- The CSV text will be generated such that it can be read back according to the corresponding rules for import.
+- If these options do not permit this (for example, a field contains the quote character and neither DoubleQuote or EscapeChar are set) an error is signalled.
+- Quoting and Escaping is used as conservatively as possible.
+- If both QuoteChar and EscapeChar are set, quoting is favoured.
+
+If `Y` specifies that the CSV data is written to a file then `R` is the number of bytes (not characters) written, and is shy.
+
+Otherwise, `R` is the CSV data in the format specified in Y, and is not shy.
+
+
Examples
+```apl
+ CSVFile←'c:\Dyalog16.0\sales.csv'
+ DATA⍪←'Gizmos' 23
+ DATA HDR ⎕CSV''
+┌→────────────┐
+│Product,Sales│
+│ │
+│Widgets,1912 │
+│ │
+│Gimlets,205 │
+│ │
+│Dingbats,189 │
+│ │
+│Gizmos,23 │
+│ │
+│ │
+└─────────────┘
+
+ CSVFile1←'c:\Dyalog16.0\sales1.csv'
+ ⎕←DATA HDR ⎕CSV CSVFile1
+
+67
+ DATA⍪←'Gimbals' 123
+ ⎕←DATA HDR ⎕CSV CSVFile1
+FILE NAME ERROR: Unable to create file ("The file exists.")
+ ⎕←DATA HDR ⎕CSV CSVFile1
+ ∧
+```
+
+
+
+## Notes
+
+- When `Y` contains only the destination of the CSV data (that is, omits the description in its second element) it does not have to be enclosed to form a single element vector.
+- Native files are written from the current file position. On successful completion, the file position will be at the end of the written data. If an error is signalled the amount of data written is undefined.
+- If the file encoding specifies that a BOM is required and output is to a native file, it will only be written if the file position is initially at 0 - that is, the start of the file is being written.
+- When fixed width fields are written, character data shorter than the specified width is padded with spaces to the right and character data longer than the specified width signals an error. Numeric data is converted to character data as far as possible so that it fits into the specified width. If this is not possible, an error is signalled.
+- Tab-separated fields may be exported by specifying `'Separator' (⎕UCS 9)`.
+- Fields containing a single embedded new line are supported. On export, line feed characters are mapped back to the defined line ending sequence.
+
+
+
+ ⎕CSV CSV
+
diff --git a/language-reference-guide/docs/system-functions/csv.md b/language-reference-guide/docs/system-functions/csv-monadic.md
similarity index 67%
rename from language-reference-guide/docs/system-functions/csv.md
rename to language-reference-guide/docs/system-functions/csv-monadic.md
index f72807eec6d..92da2c206d8 100644
--- a/language-reference-guide/docs/system-functions/csv.md
+++ b/language-reference-guide/docs/system-functions/csv-monadic.md
@@ -3,33 +3,11 @@ search:
boost: 2
---
-#
Comma Separated Values `{R}←{X} ⎕CSV Y`{{key}}
+#
Import CSV `{R}←⎕CSV Y`{{key}}
-This function imports and exports Comma Separated Value (CSV) data.
+Monadic `⎕CSV` imports Comma Separated Value (CSV) data from a CSV file, or converts data from CSV format to an internal format.
-Monadic `⎕CSV` imports data from a CSV file or converts data from CSV format to an internal format. Dyadic `⎕CSV` exports data to a CSV file or converts data from internal format to a CSV format.
-
-`⎕CSV` output is not affected by [`⎕PP`](pp); numeric values are always represented with full precision.
-
-## Internal Format
-
-Arrays that result from importing CSV data or arrays that are suitable for exporting as CSV data are represented by 3 possible structures:
-
-- A table (a matrix whose elements are character vectors or scalars, or numbers).
-- A vector, each of whose items contain field (column) values. Character field values are character matrices; numeric field values are numeric vectors.
-- A vector, each of whose items contain field (column) values. Character field values are vectors of character vectors; numeric field values are numeric vectors.
-
-Note that when importing CSV data, all fields are assumed to be character fields unless otherwise specified (see *Column Types* below). A field that contains only "numbers" will not be converted to numeric data unless specified as being numeric.
-
-## MetaCharacters
-
-Some characters in a CSV file are metacharacters that define the structure of the data; for example, the field separator character between fields. Characters that are not metacharacters are literal characters. The variant options QuoteChar, EscapeChar, and DoubleQuote make it possible to interpret metacharacters as literal characters, and thus permit fields to contain field separator characters, leading and trailing spaces, and line-endings.
-
-Fixed-width fields do not require these options and they are ignored if fixed-width fields are being processed.
-
-# Monadic `⎕CSV`
-
-`R←⎕CSV Y`
+To convert an array to CSV, use [dyadic `⎕CSV`](csv-dyadic.md).
`Y` is an array that specifies just the source of the CSV data (see below) or a 1,2,3 or 4-element vector containing:
@@ -50,7 +28,7 @@ Fixed-width fields do not require these options and they are ignored if fixed-wi
If `Y[1]` is a file name or tie number *Description* may be one of:
-- a character vector specifying the file encoding such as `'UTF-8'` (see [File Encodings](nget.md)).
+- a character vector specifying the file encoding such as `'UTF-8'` (see [File Encodings](nget-dyadic.md)).
- a 256-element numeric vector that maps each possible byte value (0-255) to a Unicode code point (1st element = Unicode code point corresponding to byte value 0, and so on). ¯1 indicates that the corresponding byte value is not mapped to any character. Apart from ¯1, no value may appear in the table more than once.
If omitted or empty, the file encoding is deduced (see below).
@@ -75,7 +53,23 @@ Note that if *Column Types* is specified by a scalar 4, all numeric data in all
This is a Boolean value (default 0) to specify whether or not the first record in a CSV file is a list of column labels. If *Header Row Indicator* is 1, the first record (the *header row*) is treated differently from other records. It is assumed to contain character data (labels) regardless of `Y[3]` and is returned separately in the result.
-## Variant options
+## Internal Format
+
+Arrays that result from importing CSV data are represented by 3 possible structures:
+
+- A table (a matrix whose elements are character vectors or scalars, or numbers).
+- A vector, each of whose items contain field (column) values. Character field values are character matrices; numeric field values are numeric vectors.
+- A vector, each of whose items contain field (column) values. Character field values are vectors of character vectors; numeric field values are numeric vectors.
+
+Note that when importing CSV data, all fields are assumed to be character fields unless otherwise specified (see *Column Types* below). A field that contains only "numbers" will not be converted to numeric data unless specified as being numeric.
+
+## MetaCharacters
+
+Some characters in a CSV file are metacharacters that define the structure of the data; for example, the field separator character between fields. Characters that are not metacharacters are literal characters. The variant options QuoteChar, EscapeChar, and DoubleQuote make it possible to interpret metacharacters as literal characters, and thus permit fields to contain field separator characters, leading and trailing spaces, and line-endings.
+
+Fixed-width fields do not require these options and they are ignored if fixed-width fields are being processed.
+
+## Variant Options
Monadic `⎕CSV` may be applied using the Variant operator with the following options. The Principal option is Invert.
@@ -214,7 +208,7 @@ If `Y[4]` does specify that the data contains a header then `R` is a 2-element v
Data may be read from a named file or a tied native file. A tied native file may be read in sections by repeatedly invoking `⎕CSV` for a specified maximum number of records (specified by the Records variant) until no more data is read.
-In all cases the files must contain text using one of the supported encodings (see [File Encodings](nget.md)). The method used to determine the file encoding is as follows:
+In all cases the files must contain text using one of the supported encodings (see [File Encodings](nget-dyadic.md)). The method used to determine the file encoding is as follows:
- If a Byte Order Mark (BOM) is encountered at the start of the file, it is used regardless of `Y[2]` (if specified). Note, however, that the BOM can only be encountered if the file is read from the start - specifically, if a native file is read in sections, any BOM present will only be encountered when the first section is read.
- Otherwise, the file will be read and decoded according to the file encoding in `Y[2]` if specified.
@@ -227,129 +221,6 @@ Note that:
- native files are read from the current file position. On successful completion, the file position will be at the first unprocessed character (end of file if the Records variant option is not specified). If an error is signalled the file position is undefined.
- the result does not report the file encoding or line ending type as it does with `⎕NGET`. If this information is required then it must be obtained by other means.
-# Dyadic `⎕CSV`
-
-`{R}←X ⎕CSV Y`
-
-The left argument `X` is either:
-
-- a matrix or a vector of vectors/matrices containing the data to be converted to CSV format.
-- or a 2-element vector containing a matrix or vector of vectors/matrices containing the data to be converted to CSV format, and a vector of character vectors containing the header record.
-
-`Y` is a 1 or 2-element vector containing:
-
-|-----|---------------------------------------|
-|`[1]`|Destination of CSV Data (see below) |
-|`[2]`|Description of the CSV data (see below)|
-
-*Destination* - may be one of:
-
-- a character vector or scalar containing a file name
-- a native tie number
-- an empty character vector, indicating that the CSV data is to be returned in the result `R`
-
-*Description*
-
-If `Y[1]` is a file name or tie number, *Description* may be:
-
-- a character vector specifying the file encoding such as `'UTF-8'` (see [File Encodings](nget.md)).
-- a 256-element numeric vector that maps each possible byte value (0-255) to a Unicode code point (1st element = Unicode code point corresponding to byte value 0, and so on). ¯1 indicates that the corresponding byte value is not mapped to any character. Apart from ¯1, no value may appear in the table more than once.
-
-If `Y[1]` is empty, *Description* may be a character scalar `'S'` (simple) or `'N'` (nested). If omitted, the default is `'S'`
-
-## Variant options
-
-Dyadic `⎕CSV` may be applied using the _variant_ operator with the following options.
-
-|Name|Meaning|Default|
-|---|---|---|
-|Decimal|the decimal mark in numeric fields - one of `'.'` or `','`|`'.'`|
-|DoubleQuote|A Boolean which indicates whether (`1`) or not (`0`) a quote character within a quoted field is represented by two consecutive quote characters|`1`|
-|EscapeChar|The escape character, which may be specified as an empty character vector (meaning none is defined) or a character scalar|`0`|
-|ForceQuotes|A number specifying the degree to which quotes are applied around fields even if not strictly required. Possible values are:
- `0` – add only if required
- `1` – add to all fields containing character data and to fields containing numeric data if required
- `2` – add to all fields even if not required
If ForceQuotes is a scalar, the value applies to all columns; if it is a vector of values then each value applies to the corresponding column.|`0`|
-|IfExists|a character vector `'Error'` or `'Replace'` which specifies, when creating a named file which already exists, whether to overwrite it ( `'Replace'` ) or signal an error ( `'Error'` )|`'Error'`|
-|LineEnding|the line ending sequence - see [Line separators:](nget.md)|(13 10) on Windows; 10 on other platforms|
-|QuoteChar|The field quote character (delimiter), which may be specified as an empty character vector (meaning none is defined) or a character scalar|`"`|
-|Separator|the field separator, any single character. If Widths is other than `⍬` , Separator is ignored.|`','`|
-|Thousands|the thousands separator in numeric fields, which can be specified as an empty character vector (meaning no separator is defined) or a character scalar|`''`|
-|Trim|a Boolean specifying whether whitespace is trimmed at the beginning and end of character fields|`1`|
-|Widths|a vector of numeric values describing the width (in characters) of the corresponding columns in the CSV source, or `⍬` for variable width delimited fields|`⍬`|
-
-The Separator, QuoteChar, and EscapeChar characters, when defined, must be different. Other options defined for import are also accepted but ignored.
-
-The Overwrite variant option (Boolean) from Version 16.0 remains supported but is deprecated in favour of IfExists.
-
-### QuoteChar, EscapeChar, and DoubleQuote options
-
-- The CSV text will be generated such that it can be read back according to the corresponding rules for import.
-- If these options do not permit this (for example, a field contains the quote character and neither DoubleQuote or EscapeChar are set) an error is signalled.
-- Quoting and Escaping is used as conservatively as possible.
-- If both QuoteChar and EscapeChar are set, quoting is favoured.
-
-If `Y` specifies that the CSV data is written to a file then `R` is the number of bytes (not characters) written, and is shy.
-
-Otherwise, `R` is the CSV data in the format specified in Y, and is not shy.
-
-
Examples
-```apl
- CSVFile←'c:\Dyalog16.0\sales.csv'
- ⎕←DATA HDR←⎕CSV CSVFile''(1 2)1
-┌→──────────────────────────────────────────┐
-│ ┌→────────────────┐ ┌→──────────────────┐ │
-│ ↓ ┌→──────┐ │ │ ┌→──────┐ ┌→────┐ │ │
-│ │ │Widgets│ 1912 │ │ │Product│ │Sales│ │ │
-│ │ └───────┘ │ │ └───────┘ └─────┘ │ │
-│ │ ┌→──────┐ │ └∊──────────────────┘ │
-│ │ │Gimlets│ 205 │ │
-│ │ └───────┘ │ │
-│ │ ┌→───────┐ │ │
-│ │ │Dingbats│ 189 │ │
-│ │ └────────┘ │ │
-│ └∊────────────────┘ │
-└∊──────────────────────────────────────────┘
-
- DATA⍪←'Gizmos' 23
- DATA HDR ⎕CSV''
-┌→────────────┐
-│Product,Sales│
-│ │
-│Widgets,1912 │
-│ │
-│Gimlets,205 │
-│ │
-│Dingbats,189 │
-│ │
-│Gizmos,23 │
-│ │
-│ │
-└─────────────┘
-
- CSVFile1←'c:\Dyalog16.0\sales1.csv'
- ⎕←DATA HDR ⎕CSV CSVFile1
-
-67
- DATA⍪←'Gimbals' 123
- ⎕←DATA HDR ⎕CSV CSVFile1
-FILE NAME ERROR: Unable to create file ("The file exists.")
- ⎕←DATA HDR ⎕CSV CSVFile1
- ∧
- ⎕←DATA HDR(⎕CSV⍠'IfExists' 'Replace')CSVFile1
-
-80
-
-```
-
-
-
-## Notes
-
-- When `Y` contains only the destination of the CSV data (that is, omits the description in its second element) it does not have to be enclosed to form a single element vector.
-- Native files are written from the current file position. On successful completion, the file position will be at the end of the written data. If an error is signalled the amount of data written is undefined.
-- If the file encoding specifies that a BOM is required and output is to a native file, it will only be written if the file position is initially at 0 - that is, the start of the file is being written.
-- When fixed width fields are written, character data shorter than the specified width is padded with spaces to the right and character data longer than the specified width signals an error. Numeric data is converted to character data as far as possible so that it fits into the specified width. If this is not possible, an error is signalled.
-- Tab-separated fields may be exported by specifying `'Separator' (⎕UCS 9)`.
-- Fields containing a single embedded new line are supported. On export, line feed characters are mapped back to the defined line ending sequence.
-
⎕CSV CSV
diff --git a/language-reference-guide/docs/system-functions/ed-disambiguation.md b/language-reference-guide/docs/system-functions/ed-disambiguation.md
new file mode 100644
index 00000000000..e9e44471676
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/ed-disambiguation.md
@@ -0,0 +1,20 @@
+---
+search:
+ exclude: true
+---
+
+#
Edit Object `⎕ED`
+
+## Monadic `⎕ED` means
+
+[Edit Objects](ed-monadic.md)
+```apl
+ ⎕ED'MyFn'
+```
+
+## Dyadic `⎕ED` means
+
+[Edit Objects with Type](ed-dyadic.md)
+```apl
+ '○'⎕ED'MyClass'
+```
diff --git a/language-reference-guide/docs/system-functions/ed.md b/language-reference-guide/docs/system-functions/ed-dyadic.md
similarity index 64%
rename from language-reference-guide/docs/system-functions/ed.md
rename to language-reference-guide/docs/system-functions/ed-dyadic.md
index 9ced518b2f4..9f1a5a2b3ad 100644
--- a/language-reference-guide/docs/system-functions/ed.md
+++ b/language-reference-guide/docs/system-functions/ed-dyadic.md
@@ -3,14 +3,14 @@ search:
boost: 2
---
-#
Edit Object `{R}←{X}⎕ED Y`{{key}}
+#
Edit Objects with Type `{R}←X ⎕ED Y`{{key}}
`⎕ED` invokes the Editor. `Y` is a simple character vector, a simple character matrix, or a vector of character vectors, containing the name(s) of objects to be edited.
-The optional left argument `X` is a character scalar or character vector (where `=/≢X Y`) which specifies the type(s) of the corresponding (new) object(s) named in `Y` as:
+The left argument `X` is a character scalar or character vector (where `(≢X)∊1,≢Y`) which specifies the type(s) of the corresponding (new) object(s) named in `Y` as:
|---|---------------------------|
-|`∇`|function/operator |
+|`∇`|function/operator ([default](ed-monadic.md))|
|`→`|simple character vector |
|`∊`|vector of character vectors|
|`-`|character matrix |
@@ -26,9 +26,9 @@ The Editor opens in array-notation mode; the resulting array can be of any type
If `⎕ED` is called from the Session, it opens Edit windows for the object(s) named in `Y` and returns a null result. The cursor is positioned in the first of the Edit windows opened by `⎕ED`, but may be moved to the Session or to any other window which is currently open. The effect is almost identical to using `)ED`.
-If `⎕ED` is called from a defined function or operator, its behaviour is different. On asynchronous terminals, the Edit windows are automatically displayed in "full-screen" mode (ZOOMED). In all implementations, the user is restricted to those windows named in `Y`. The user may not skip to the Session even though the Session may be visible.
+If `⎕ED` is called from a defined function or operator, its behaviour is different. On asynchronous terminals, the Edit windows are automatically displayed in "full-screen" mode (_zoomed_). In all implementations, the user is restricted to those windows named in `Y`. The user may not skip to the Session even though the Session may be visible.
-`⎕ED` terminates and returns a result ONLY when the user explicitly closes all the windows for the named objects. In this case the result contains the names of any objects which have been newly (re)fixed in the workspace as a result of the `⎕ED`, and has the same structure as `Y`.
+`⎕ED` terminates and returns a result _only_ when the user explicitly closes all the windows for the named objects. In this case the result contains the names of any objects which have been newly (re)fixed in the workspace as a result of the `⎕ED`, and has the same structure as `Y`.
Objects named in `Y` that cannot be edited are silently ignored. Objects qualified with a namespace path are (for example, `a.b.c.foo`) are silently ignored if the namespace does not exist.
@@ -56,17 +56,17 @@ There is no Principal Option.
A←3 11⍴'Hello World'
```
-In the first example, `⎕ED` will display the contents of `A` as an editable character array which the user may change. The user can double-click on *Hello* to open an edit window on an object named `Hello` (which will be a new function if `Hello` is currently undefined). Furthermore, the user can enter any arbitrary name and double-click to edit it. This may be undesirable in an application.
+In the first example, `⎕ED` will display the contents of `A` as [array notation](../../programming-reference-guide/introduction/arrays/array-notation.md) which the user may change. The user can double-click on `Hello` to open an edit window on an object named `Hello` (which will be a new function if `Hello` is currently undefined). Furthermore, the user can enter any arbitrary name and double-click to edit it. This may be undesirable in an application.
```apl
- ⎕ED A
+ '⋄' ⎕ED A
```
-In the second example, the Edit window will display the contents of `A` as a ReadOnly Character array. The user can still open a new edit by double-clicking *Hello* or *World* but nothing else.
+In the second example, the Edit window will display the contents of `A` as a read-only array notation. The user can still open a new edit by double-clicking `Hello` or `World` but nothing else.
```apl
- (⎕ED ⍠ 'ReadOnly' 1) 'A'
+ '⋄'(⎕ED ⍠ 'ReadOnly' 1) 'A'
```
-In the final example, the Edit window will display the contents of `A` as a ReadOnly Character array and the user cannot open a new edit window.
+In the final example, the Edit window will display the contents of `A` as a read-only array notation and the user cannot open a new edit window.
```apl
- (⎕ED ⍠('ReadOnly' 1)('EditName' 'Disallow'))'A'
+ '⋄'(⎕ED ⍠('ReadOnly' 1)('EditName' 'Disallow'))'A'
```
diff --git a/language-reference-guide/docs/system-functions/ed-monadic.md b/language-reference-guide/docs/system-functions/ed-monadic.md
new file mode 100644
index 00000000000..e7ad4bc4daf
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/ed-monadic.md
@@ -0,0 +1,58 @@
+---
+search:
+ boost: 2
+---
+
+#
Edit Objects `{R}←⎕ED Y`{{key}}
+
+`⎕ED` invokes the Editor. `Y` is a simple character vector, a simple character matrix, or a vector of character vectors, containing the name(s) of objects to be edited.
+
+If a name in `Y` is not already defined, the Editor assumes the new object to be a function or operator; [dyadic `⎕ED`](ed-dyadic.md) can specify other types.
+
+If `⎕ED` is called from the Session, it opens Edit windows for the object(s) named in `Y` and returns a null result. The cursor is positioned in the first of the Edit windows opened by `⎕ED`, but may be moved to the Session or to any other window which is currently open. The effect is almost identical to using `)ED`.
+
+If `⎕ED` is called from a defined function or operator, its behaviour is different. On asynchronous terminals, the Edit windows are automatically displayed in "full-screen" mode (_zoomed_). In all implementations, the user is restricted to those windows named in `Y`. The user may not skip to the Session even though the Session may be visible.
+
+`⎕ED` terminates and returns a result _only_ when the user explicitly closes all the windows for the named objects. In this case the result contains the names of any objects which have been newly (re)fixed in the workspace as a result of the `⎕ED`, and has the same structure as `Y`.
+
+Objects named in `Y` that cannot be edited are silently ignored. Objects qualified with a namespace path are (for example, `a.b.c.foo`) are silently ignored if the namespace does not exist.
+
+## Variants of Edit Object
+
+The behaviour of `⎕ED` may be modified using the variant operator `⍠` with the following options:
+
+- `'ReadOnly'` - 0 or 1
+- `'EditName'` - `'Default'`, `'Allow'` or `'Disallow'`.
+
+If `ReadOnly` is set to 1, the edit window and all edit windows opened from it will be read-only. Note that setting `ReadOnly` to 0 will have no effect if the edit window is inherently read-only due to the nature of its content.
+
+The `'EditName'` option determines whether or not the user may open another edit window by clicking a name, and its values are interpreted as follows:
+
+|EditName |`⎕ED` called from session|`⎕ED` called from function|
+|------------|-------------------------|--------------------------|
+|`'Default'` |Allow |Disallow |
+|`'Allow'` |Allow |Allow |
+|`'Disallow'`|Disallow |Disallow |
+
+There is no Principal Option.
+
+
Examples
+```apl
+ A←3 11⍴'Hello World'
+```
+
+In the first example, `⎕ED` will display the contents of `A` as an editable character array which the user may change. The user can double-click on `Hello` to open an edit window on an object named `Hello` (which will be a new function if `Hello` is currently undefined). Furthermore, the user can enter any arbitrary name and double-click to edit it. This may be undesirable in an application.
+```apl
+ ⎕ED A
+```
+
+In the second example, the Edit window will display the contents of `A` as a read-only character array. The user can still open a new edit by double-clicking `Hello` or `World` but nothing else.
+```apl
+ (⎕ED ⍠ 'ReadOnly' 1) 'A'
+```
+
+In the final example, the Edit window will display the contents of `A` as a read-only character array and the user cannot open a new edit window.
+```apl
+ (⎕ED ⍠('ReadOnly' 1)('EditName' 'Disallow'))'A'
+```
+
diff --git a/language-reference-guide/docs/system-functions/export-disambiguation.md b/language-reference-guide/docs/system-functions/export-disambiguation.md
new file mode 100644
index 00000000000..f002ea3d212
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/export-disambiguation.md
@@ -0,0 +1,38 @@
+---
+search:
+ exclude: true
+---
+
+#
Export Object `⎕EXPORT`
+
+## Monadic `⎕EXPORT` means
+
+[Query Export Type](export-monadic.md)
+```apl
+ ⎕FX 'MyFn' 'r←42'
+ ⎕EXPORT 'MyFn'
+1
+ 0 ⎕EXPORT 'MyFn'
+ ⎕EXPORT 'MyFn'
+0
+```
+
+## Dyadic `⎕EXPORT` means
+
+[Set Export Type](export-dyadic.md)
+```apl
+ 'utils' ⎕NS ⍬
+ utils.⎕FX 'r←MyUtil y' 'r←Sub y'
+ utils.⎕FX 'r←Sub y' 'r←y y'
+ 0 utils.⎕EXPORT 'Sub'
+ ⎕PATH←'utils'
+ MyUtil 10
+10 10
+ Sub 10
+VALUE ERROR: Undefined name: Sub
+ Sub 10
+ ∧
+```
+
+!!! Legacy "Legacy"
+ `⎕EXPORT` does not support derived functions and will not be extended to support them; nor will it be extended to support other types of functions that may be developed in the future. `⎕EXPORT` may therefore be considered an archaic feature.
diff --git a/language-reference-guide/docs/system-functions/export-dyadic.md b/language-reference-guide/docs/system-functions/export-dyadic.md
new file mode 100644
index 00000000000..d25f233b0df
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/export-dyadic.md
@@ -0,0 +1,51 @@
+---
+search:
+ boost: 2
+---
+
+#
Set Export Type `{R}←X ⎕EXPORT Y`{{key}}
+
+`⎕EXPORT` is used to set the export type of a defined function (or operator) referenced by the [`⎕PATH`](path.md) mechanism.
+
+`Y` is a character matrix or vector-of-vectors representing the names of functions and operators whose export type is to be set.
+
+`X` is an integer scalar or vector (one per name in the namelist) indicating the export type. `X` can currently be one of the values:
+
+- 0 - not exported.
+- 1 - exported (initial value).
+
+A scalar or 1-element-vector type is replicated to conform with a multi-name list.
+
+The shy result `R` is a vector that reports the export type of the functions and operators named in `Y`.
+
+When the path mechanism locates a referenced function (or operator) in the list of namespaces in the `⎕PATH` system variable, it examines [the function's export type](export-monadic.md):
+
+|---|---|
+|0|This instance of the function is ignored and the search is resumed at the next namespace in the `⎕PATH` list. Type-0 is typically used for functions residing in a utility namespace which are not themselves utilities, for example the private sub-function of a utility function.|
+|1|This instance of the function is executed in the namespace in which it was found and the search terminated. The effect is exactly as if the function had been referenced by its full path name.|
+
+
Example
+```apl
+ 'utils' ⎕NS ⍬
+ utils.⎕FX 'r←MyUtil y' 'r←Sub y'
+ utils.⎕FX 'r←Sub y' 'r←y y'
+ 0 utils.⎕EXPORT 'Sub'
+ ⎕PATH←'utils'
+ MyUtil 10
+10 10
+ Sub 10
+VALUE ERROR: Undefined name: Sub
+ Sub 10
+ ∧
+```
+
+!!! Warning "Warning"
+ The left domain of `⎕EXPORT` might be extended in future to include extra types 2, 3,... (for example, to change the behaviour of the function). This means that, while `⎕EXPORT` returns a Boolean result in the first version, this might not be the case in the future. If you need a Boolean result, use `0=` or an equivalent. For example, use `0=0 ⎕EXPORT Y` to verify that setting the export type to `0` succeeded.
+
+!!! Legacy "Legacy"
+ `⎕EXPORT` does not support derived functions and will not be extended to support them; nor will it be extended to support other types of functions that may be developed in the future. `⎕EXPORT` may therefore be considered an archaic feature.
+
+
+
+ ⎕EXPORT EXPORT
+
diff --git a/language-reference-guide/docs/system-functions/export-monadic.md b/language-reference-guide/docs/system-functions/export-monadic.md
new file mode 100644
index 00000000000..da2fe598b4f
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/export-monadic.md
@@ -0,0 +1,39 @@
+---
+search:
+ boost: 2
+---
+
+#
Query Export Type `{R}←⎕EXPORT Y`{{key}}
+
+`⎕EXPORT` is used to query the export type of a defined function (or operator) referenced by the [`⎕PATH`](path.md) mechanism, as [set by dyadic `⎕EXPORT`](export-dyadic.md).
+
+`Y` is a character matrix or vector-of-vectors representing the names of functions and operators whose export type is to be queried.
+
+The result `R` is a vector that reports the export type of the functions and operators named in `Y`.
+
+When the path mechanism locates a referenced function (or operator) in the list of namespaces in the `⎕PATH` system variable, it examines the function's export type:
+
+|---|---|
+|0|This instance of the function is ignored and the search is resumed at the next namespace in the `⎕PATH` list. Type-0 is typically used for functions residing in a utility namespace which are not themselves utilities, for example the private sub-function of a utility function.|
+|1|This instance of the function is executed in the namespace in which it was found and the search terminated. The effect is exactly as if the function had been referenced by its full path name.|
+
+
Example
+```apl
+ ⎕FX 'MyFn' 'r←42'
+ ⎕EXPORT 'MyFn'
+1
+ 0 ⎕EXPORT 'MyFn'
+ ⎕EXPORT 'MyFn'
+0
+```
+
+!!! Warning "Warning"
+ `⎕EXPORT` returns a Boolean result at present, but extra types 2, 3,... might be added in future. This means that, while `⎕EXPORT` returns a Boolean result in the current version, this might not be the case in the future. If you need a Boolean result, use `0≠` or an equivalent. For example, use `(0≠⎕EXPORT ⎕NL 3 4)⌿⎕NL 3 4` to get a list of exported functions and operators.
+
+!!! Legacy "Legacy"
+ `⎕EXPORT` does not support derived functions and will not be extended to support them; nor will it be extended to support other types of functions that may be developed in the future. `⎕EXPORT` may therefore be considered an archaic feature.
+
+
+
+ ⎕EXPORT EXPORT
+
diff --git a/language-reference-guide/docs/system-functions/export.md b/language-reference-guide/docs/system-functions/export.md
deleted file mode 100644
index 69494aea104..00000000000
--- a/language-reference-guide/docs/system-functions/export.md
+++ /dev/null
@@ -1,38 +0,0 @@
----
-search:
- boost: 2
----
-
-#
Export Object `{R}←{X}⎕EXPORT Y`{{key}}
-
-`⎕EXPORT` is used to set or query the export type of a defined function (or operator) referenced by the `⎕PATH` mechanism.
-
-`Y` is a character matrix or vector-of-vectors representing the names of functions and operators whose export type is to be set or queried.
-
-`X` is an integer scalar or vector (one per name in the namelist) indicating the export type. `X` can currently be one of the values:
-
-- 0 - not exported.
-- 1 - exported (default).
-
-A scalar or 1-element-vector type is replicated to conform with a multi-name list.
-
-The result `R` is a vector that reports the export type of the functions and operators named in `Y`. When used dyadically to set export type, the result is shy.
-
-When the path mechanism locates a referenced function (or operator) in the list of namespaces in the `⎕PATH` system variable, it examines the function's export type:
-
-|---|---|
-|0|This instance of the function is ignored and the search is resumed at the next namespace in the `⎕PATH` list. Type-0 is typically used for functions residing in a utility namespace which are not themselves utilities, for example the private sub-function of a utility function.|
-|1|This instance of the function is executed in the namespace in which it was found and the search terminated. The effect is exactly as if the function had been referenced by its full path name.|
-
-Warning: The left domain of `⎕EXPORT` may be extended in future to include extra types 2, 3,... (for example, to change the behaviour of the function). This means that, while `⎕EXPORT` returns a Boolean result in the first version, this may not be the case in the future. If you need a Boolean result, use `0≠` or an equivalent.
-```apl
- (0≠⎕EXPORT ⎕NL 3 4)⌿⎕NL 3 4 ⍝ list of exported
- ⍝ functions and ops.
-```
-
-`⎕EXPORT` does not support derived functions and will not be extended to support them; nor will it be extended to support other types of functions that may be developed in the future. `⎕EXPORT` may therefore be considered an archaic feature.
-
-
-
- ⎕EXPORT EXPORT
-
diff --git a/language-reference-guide/docs/system-functions/fchk-disambiguation.md b/language-reference-guide/docs/system-functions/fchk-disambiguation.md
new file mode 100644
index 00000000000..45281d12fa5
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/fchk-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+#
File Check and Repair `⎕FCHK`
+
+## Monadic `⎕FCHK` means
+
+[Check/Repair Component File](fchk-monadic.md)
+
+## Dyadic `⎕FCHK` means
+
+[Custom Check/Repair Component File](fchk-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/fchk.md b/language-reference-guide/docs/system-functions/fchk-dyadic.md
similarity index 50%
rename from language-reference-guide/docs/system-functions/fchk.md
rename to language-reference-guide/docs/system-functions/fchk-dyadic.md
index 247cfb28df9..e2f9417cea7 100644
--- a/language-reference-guide/docs/system-functions/fchk.md
+++ b/language-reference-guide/docs/system-functions/fchk-dyadic.md
@@ -3,17 +3,18 @@ search:
boost: 2
---
-#
File Check and Repair `R←{X} ⎕FCHK Y`{{key}}
+#
Custom Check/Repair Component File `R←X ⎕FCHK Y`{{key}}
`⎕FCHK` validates and repairs component files, and validates files associated with external variables, following an abnormal termination of the APL process or operating system.
-`Y` must be a simple character scalar or vector which specifies the name of the file to be exclusively checked or repaired. For component files, the file must be named in accordance with the operating system's conventions, and may be a relative or absolute pathname. The file must exist and must not be tied. If no file extension is supplied, the set of extensions specified by the **CFEXT** parameter are tried one after another until the file is found or the set of extensions is exhausted. See [CFEXT](../../../windows-installation-and-configuration-guide/configuration-parameters/configuration-parameters).
+`Y` must be a simple character scalar or vector which specifies the name of the file to be exclusively checked or repaired. For component files, the file must be named in accordance with the operating system's conventions, and may be a relative or absolute pathname. The file must exist and must not be tied. If no file extension is supplied, the set of extensions specified by the [**CFEXT**](../../../windows-installation-and-configuration-guide/configuration-parameters/configuration-parameters) parameter are tried one after another until the file is found or the set of extensions is exhausted.
For files associated with external variables, any filename extension must be specified even if `⎕XT` would not require it. The file must exist and must not currently be associated with an external variable.
-Options for `⎕FCHK` are specified using the Variant operator `⍠` or by the optional left argument `X`. The former is recommended but the older mechanism using the left argument is still supported.
+!!! Legacy "Legacy"
+ Specifying options by the left argument `X` is still supported. [Using the Variant operator `⍠` with monadic `⎕FCHK`](fchk-monadic.md) is recommended instead.
-In either case, the default behaviour is as follows:
+The default behaviour is as follows:
1. If the file appears to have been cleanly untied previously, return `⍬`, that is, report that the file is good.
2. Otherwise, validate the file and return the appropriate result. If the file is corrupt, no attempt is made to repair it.
@@ -21,74 +22,38 @@ In either case, the default behaviour is as follows:
The result `R` is a vector of the numbers of missing or damaged components. `R` may include non-positive numbers of "pseudo components" that indicate damage to parts of the file other than in specific components:
|----|---------------------|
-|`0` |ACCESS MATRIX. |
-|`¯1`|Free-block tree. |
-|`¯2`|Component index tree.|
+|`0` |Access matrix |
+|`¯1`|Free-block tree |
+|`¯2`|Component index tree|
Other negative numbers represent damage to the file metadata; this set may be extended in the future.
-## Specifying options using Variant
+`X` must be a vector of zero or more character vectors from among `'force'`, `'repair'` and `'rebuild'`, which determine the detailed operation of the function. Note that these options are case-insensitive.
-Using Variant, the options are as follows:
-
-- Task
-- Repair
-- Force
-
-*Rebuild* causes the *file indices* to be discarded and rebuilt. *Repair* only takes place on files which have been checked and found to be damaged. It involves a rebuild, but that only takes place if it is needed. Note that Repair and Force only apply if Task is `'Scan'`.
-
-### Task
-
-|---------|----------------------------------------------------------------------------|
-|Scan { .shaded } |causes the file to be checked and optionally repaired (see `'Repair'` below)|
-|`Rebuild`|causes the file to be unconditionally rebuilt |
-
-### Repair (principle option)
+- If `X` contains `'force'`, `⎕FCHK` will validate the file even if it appears to have been cleanly untied.
+- If `X` contains `'repair'`, `⎕FCHK` will repair the file, following validation, if it appears to be damaged. This option may be used in conjunction with `'force'`.
+- If `X` contains `'rebuild'`, `⎕FCHK` will repair the file unconditionally.
-|---|-------------------------------------------------|
-|0 { .shaded } |do not repair |
-|`1`|causes the file to be repaired if damage is found|
+Following a *check* of the file, a non-null result indicates that the file is damaged.
-### Force
+Following a *repair* of the file, the result indicates those components that could not be recovered. Un-recovered components will give a `FILE COMPONENT DAMAGED` error if read but may be replaced without error.
-|---|-------------------------------------------------------------------|
-|0 { .shaded } |do not validate the file if it appears to have been properly closed|
-|`1`|validate the file even if it appears to have been properly closed |
+Repair can recover only check-summed components from the file, that is, only those components that were written with the checksum option enabled (see [File Properties](fprops.md)).
-Default values are highlighted thus{ .shaded } in the above tables.
+Following an operating system crash, repair may result in one or more individual components being rolled back to a previous version or not recovered at all, unless Journaling levels 2 or 3 were also set when these components were written.
Examples
To check a file and attempt to fix it if damage is found:
```apl
- (⎕FCHK ⍠ 1)'suspect.dcf'
+ 'repair' ⎕FCHK ⍠ 1 'suspect.dcf'
```
To forcibly check a file and attempt to fix it if damage is found:
```apl
- (⎕FCHK ⍠ ('Repair' 1)('Force'1))'suspect.dcf'
+ 'repair' 'force' ⎕FCHK 'suspect.dcf'
```
-### Specifying options using a left argument
-
-Using the optional left-argument, `X` must be a vector of zero or more character vectors from among `'force'`, `'repair'` and `'rebuild'`, which determine the detailed operation of the function. Note that these options are case-insensitive.
-
-- If `X` contains `'force'`, `⎕FCHK` will validate the file even if it appears to have been cleanly untied.
-- If `X` contains `'repair'`, `⎕FCHK` will repair the file, following validation, if it appears to be damaged. This option may be used in conjunction with `'force'`.
-- If `X` contains `'rebuild'`, `⎕FCHK` will repair the file unconditionally.
-
-- If `X` contains `'force'`, `⎕FCHK` will validate the file even if it appears to have been cleanly untied.
-- If `X` contains `'repair'`, `⎕FCHK` will repair the file, following validation, if it appears to be damaged. This option may be used in conjunction with `'force'`.
-- If `X` contains `'rebuild'`, `⎕FCHK` will repair the file unconditionally.
-
-Following a *check* of the file, a non-null result indicates that the file is damaged.
-
-Following a *repair* of the file, the result indicates those components that could not be recovered. Un-recovered components will give a `FILE COMPONENT DAMAGED` error if read but may be replaced without error.
-
-Repair can recover only check-summed components from the file, that is, only those components that were written with the checksum option enabled (see [File Properties](fprops.md)).
-
-Following an operating system crash, repair may result in one or more individual components being rolled back to a previous version or not recovered at all, unless Journaling levels 2 or 3 were also set when these components were written.
-
⎕FCHK FCHK
diff --git a/language-reference-guide/docs/system-functions/fchk-monadic.md b/language-reference-guide/docs/system-functions/fchk-monadic.md
new file mode 100644
index 00000000000..305a8801cb0
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/fchk-monadic.md
@@ -0,0 +1,81 @@
+---
+search:
+ boost: 2
+---
+
+#
Check/Repair Component File `R←⎕FCHK Y`{{key}}
+
+`⎕FCHK` validates and repairs component files, and validates files associated with external variables, following an abnormal termination of the APL process or operating system.
+
+`Y` must be a simple character scalar or vector which specifies the name of the file to be exclusively checked or repaired. For component files, the file must be named in accordance with the operating system's conventions, and may be a relative or absolute pathname. The file must exist and must not be tied. If no file extension is supplied, the set of extensions specified by the [**CFEXT**](../../../windows-installation-and-configuration-guide/configuration-parameters/configuration-parameters) parameter are tried one after another until the file is found or the set of extensions is exhausted.
+
+For files associated with external variables, any filename extension must be specified even if `⎕XT` would not require it. The file must exist and must not currently be associated with an external variable.
+
+Options for `⎕FCHK` are specified using the Variant operator `⍠`.
+
+The default behaviour is as follows:
+
+1. If the file appears to have been cleanly untied previously, return `⍬`, that is, report that the file is good.
+2. Otherwise, validate the file and return the appropriate result. If the file is corrupt, no attempt is made to repair it.
+
+The result `R` is a vector of the numbers of missing or damaged components. `R` may include non-positive numbers of "pseudo components" that indicate damage to parts of the file other than in specific components:
+
+|----|---------------------|
+|`0` |Access matrix |
+|`¯1`|Free-block tree |
+|`¯2`|Component index tree|
+
+Other negative numbers represent damage to the file metadata; this set may be extended in the future.
+
+## Variant Options
+
+The options are as follows:
+
+- `Task`
+- `Repair` (principal option)
+- `Force`
+
+`'Rebuild'` causes the *file indices* to be discarded and rebuilt. `Repair` only takes place on files which have been checked and found to be damaged. It involves a rebuild, but that only takes place if it is needed. Note that `Repair` and `Force` only apply if `Task` is `'Scan'`.
+
+### `Task`
+
+|---------|----------------------------------------------------------------------------|
+|`'Scan'` (default)|causes the file to be checked and optionally repaired (see `Repair` below)|
+|`'Rebuild'`|causes the file to be unconditionally rebuilt |
+
+Following a *check* of the file, a non-null result indicates that the file is damaged.
+
+### `Repair`
+
+|---|-------------------------------------------------|
+|`0` (default)|do not repair |
+|`1`|causes the file to be repaired if damage is found|
+
+Following a *repair* of the file, the result indicates those components that could not be recovered. Un-recovered components will give a `FILE COMPONENT DAMAGED` error if read but may be replaced without error.
+
+`Repair` can recover only check-summed components from the file, that is, only those components that were written with the checksum option enabled (see [File Properties](fprops.md)).
+
+Following an operating system crash, repair may result in one or more individual components being rolled back to a previous version or not recovered at all, unless Journaling levels 2 or 3 were also set when these components were written.
+
+### `Force`
+
+|---|-------------------------------------------------------------------|
+|`0` (default)|do not validate the file if it appears to have been properly closed|
+|`1`|validate the file even if it appears to have been properly closed |
+
+
Examples
+
+To check a file and attempt to fix it if damage is found:
+```apl
+ (⎕FCHK ⍠ 1)'suspect.dcf'
+```
+
+To forcibly check a file and attempt to fix it if damage is found:
+```apl
+ (⎕FCHK ⍠ ('Repair' 1)('Force'1))'suspect.dcf'
+```
+
+
+
+ ⎕FCHK FCHK
+
diff --git a/language-reference-guide/docs/system-functions/fhold-disambiguation.md b/language-reference-guide/docs/system-functions/fhold-disambiguation.md
new file mode 100644
index 00000000000..7aba17c7463
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/fhold-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+#
File Hold `⎕FHOLD`
+
+## Monadic `⎕FHOLD` means
+
+[Component File Hold](fhold-monadic.md)
+
+## Dyadic `⎕FHOLD` means
+
+[Component File Hold with Timeout](fhold-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/fhold-dyadic.md b/language-reference-guide/docs/system-functions/fhold-dyadic.md
new file mode 100644
index 00000000000..ad03a18567f
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/fhold-dyadic.md
@@ -0,0 +1,55 @@
+---
+search:
+ boost: 2
+---
+
+#
Component File Hold with Timeout `{R}←X ⎕FHOLD Y`{{key}}
+
+## Access code 2048
+
+This function holds component file(s) and/or external variable(s). It is used to synchronise access to resources shared between multiple cooperating Dyalog processes. It is not intended to synchronise access between Dyalog threads; for this purpose you should use `:Hold`.
+
+For a multi-threaded and multi-process application, a single `⎕FHOLD` is used to synchronise inter-process access, while `:Hold` is used in multiple threads to synchronise access between threads in the same process. See also [Hold Statement](../../../programming-reference-guide/defined-functions-and-operators/traditional-functions-and-operators/control-structures/hold).
+
+If applied to component files, then `Y` is an integer scalar, vector, or one-row matrix of file tie numbers, or a two-row matrix whose first row contains file tie numbers and whose second row contains passnumbers.
+
+If applied to external variables, then `Y` is a simple scalar character, a character vector, a non-simple scalar character vector, or a vector of character vectors that specifies one or more names of external variable(s) (NOT the file names associated with those variables). Note that when `Y` is simple, each character in `Y` is interpreted as a variable name. If applied to component files **and** external variables, `Y` is a vector whose elements are either integer scalars representing tie numbers, or character scalars or vectors containing names of external variables.
+
+The effect is as follows:
+
+1. **All** of the user's preceding holds (if any) are released, whether referenced in `Y` or not.
+2. Execution is suspended until the designated files are free of holds by any other task.
+3. When all the designated files are free, execution proceeds. Until the hold is released, other tasks using `⎕FHOLD` on any of the designated files will wait.
+
+The left argument `X` is a non-negative integer that specifies a timeout in milliseconds. If step 2 (see above) does not complete before the timeout value specified by `X`, `⎕FHOLD` times out and signals a `TIMEOUT` error (1006) after releasing any holds that have succeeded.
+
+A timeout value of 0 indicates that the `⎕FHOLD` should time out at once without waiting if it cannot immediately acquire all holds. If `X` is `¯1`, `⎕FHOLD` behaves as [the monadic case](fhold-monadic.md), and does not time out.
+
+If `Y` is empty, all of the user's preceding holds (if any) are released, and execution continues.
+
+A hold is released by any of the following:
+
+- Another `⎕FHOLD`
+- Untying or retying all the designated files. If some but not all are untied or retied, they become free for another task but the hold persists for those that remain tied.
+- Termination of APL.
+- Any untrapped error or interrupt.
+- A return to immediate execution mode.
+
+Note that a hold is not released by a request for input through `⎕` or `⍞`.
+
+`⎕FHOLD` is generally useful only when called from a defined function, as holds set in immediate execution (desk calculator) mode are released immediately.
+
+If `Y` is a matrix, the shy result `R` is `Y[1;]`. Otherwise, the shy result `R` is `Y`.
+
+
Examples
+```apl
+ 3000 ⎕FHOLD 1
+TIMEOUT
+ 3000 ⎕FHOLD 1
+ ∧
+```
+
+
+
+ ⎕FHOLD FHOLD
+
diff --git a/language-reference-guide/docs/system-functions/fhold.md b/language-reference-guide/docs/system-functions/fhold-monadic.md
similarity index 81%
rename from language-reference-guide/docs/system-functions/fhold.md
rename to language-reference-guide/docs/system-functions/fhold-monadic.md
index c9b67a5f982..f6a3f45ca2a 100644
--- a/language-reference-guide/docs/system-functions/fhold.md
+++ b/language-reference-guide/docs/system-functions/fhold-monadic.md
@@ -3,7 +3,7 @@ search:
boost: 2
---
-#
File Hold `{R}←{X} ⎕FHOLD Y`{{key}}
+#
Component File Hold `{R}←⎕FHOLD Y`{{key}}
## Access code 2048
@@ -21,9 +21,7 @@ The effect is as follows:
2. Execution is suspended until the designated files are free of holds by any other task.
3. When all the designated files are free, execution proceeds. Until the hold is released, other tasks using `⎕FHOLD` on any of the designated files will wait.
-The optional left argument `X` is a non-negative integer that specifies a time-out in milliseconds. If step 2 (see above) does not complete before the time-out value specified by `X`, `⎕FHOLD` times out and signals a `TIMEOUT` error (1006) after releasing any holds that have succeeded.
-
-A time-out value of 0 indicates that the `⎕FHOLD` should time out at once without waiting if it cannot immediately acquire all holds. If `X` is `¯1`, `⎕FHOLD` behaves as the monadic case, and does not time out.
+Use [dyadic `⎕FHOLD`](fhold-dyadic.md) to include a timeout.
If `Y` is empty, all of the user's preceding holds (if any) are released, and execution continues.
@@ -41,7 +39,7 @@ Note that a hold is not released by a request for input through `⎕` or `⍞`.
If `Y` is a matrix, the shy result `R` is `Y[1;]`. Otherwise, the shy result `R` is `Y`.
-
Examples
+
Examples
```apl
⎕FHOLD 1
@@ -53,10 +51,6 @@ If `Y` is a matrix, the shy result `R` is `Y[1;]`. Otherwise, the shy result `R
⎕FHOLD 1 'XTVAR'
- 3000 ⎕FHOLD 1
-TIMEOUT
- 3000 ⎕FHOLD 1
- ∧
```
diff --git a/language-reference-guide/docs/system-functions/fix-disambiguation.md b/language-reference-guide/docs/system-functions/fix-disambiguation.md
new file mode 100644
index 00000000000..8c19f223a7f
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/fix-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+#
Fix Script `⎕FIX`
+
+## Monadic `⎕FIX` means
+
+[Define Namespace](fix-monadic.md)
+
+## Dyadic `⎕FIX` means
+
+[Define Objects](fix-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/fix-dyadic.md b/language-reference-guide/docs/system-functions/fix-dyadic.md
new file mode 100644
index 00000000000..c6f8ae18e84
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/fix-dyadic.md
@@ -0,0 +1,214 @@
+---
+search:
+ boost: 2
+---
+
+#
Define Objects `{R}←X ⎕FIX Y`{{key}}
+
+`⎕FIX` establishes namespaces, classes, interfaces and functions from the script specified by `Y` in the workspace.
+
+In this section, the term *namespace* covers scripted namespaces, classes and interfaces.
+
+`Y` can be a simple character vector, or a vector of character vectors or character scalars. The value of `X` determines what `Y` can contain.
+
+If `Y` is a simple character vector, it must be the name of a file which must exist. The contents of the file must follow the same rules that apply to `Y` when `Y` is a vector of character vectors or scalars. The file name can be relative or absolute; when considering cross-platform portability, using `/` as the directory delimiter is recommended, although `\` is also valid under Windows.
+
+`X` is a numeric scalar, `0`, `1` or `2`. The default, `1`, is equivalent to [monadic `⎕FIX`](fix-monadic.md). The result `R` is shy.
+
+| `X` | `Y` value or content of file `Y` | `R` |
+|-----|-----|-----|
+| `0` | a single valid *namespace*, which might or might not be named | a reference to the *namespace*. Even if the *namespace* is named, it is not established *per se*, although it will exist for as long as at least one reference to it exists |
+| `1` | a single valid *namespace*, which might or might not be named | a reference to the *namespace*. If `Y` contains the definition of a named *namespace*, the *namespace* is established in the workspace |
+| `2` | a series of **named** *namespaces* or function definitions, or a combination of functions and namespaces. If the script contains more than one item, tradfn definitions must be delimited by `∇` symbols. Derived and assigned functions can be specified only within namespaces | a vector of character vectors, containing the names of all of the objects that have been established in the workspace; the order of the names in `R` is not defined. Currently `2 ⎕FIX` is not certain to be an atomic operation, although this might change in future versions |
+
+
Examples
+
+In the first example, the left-argument of `0` causes the named class `MyClass` to be visible only via the reference to it (`MYREF`). It is there, but hidden.
+```apl
+ MYREF←0 ⎕FIX ':Class MyClass' ':EndClass'
+ )CLASSES
+MYREF
+ MYREF
+#.MyClass
+```
+
+In the second example, the left argument of `2` allows a script containing multiple objects to be fixed:
+
+```apl
+
+ src←':Namespace andys' '∇foo' '2' '∇'
+ src,←':EndNamespace' 'dfn←{⍺ ⍵}' '∇r←tfn'
+ src,←'r←33' '∇' ':Class c1' '∇goo' '1'
+ src,←'∇' ':EndClass'
+ ≢⎕←2⎕FIX src
+ c1 tfn dfn andys
+4
+
+```
+
+## Restrictions
+
+`⎕FIX` is unable to fix a namespace from `Y` when `Y` specifies a multi-line dfn which is preceded by a `⋄` (diamond separator).
+
+!!! Legacy "Legacy"
+ Before Dyalog v20.0, it was possible to define dfns with unmatched parentheses and brackets. These are now rejected. TradFns will continue to fix as before, but subtle differences in how the code behaves might not be backwards-compatible and could have unexpected results.
+
+## Variant Options
+
+`⎕FIX` can be applied using the Variant operator with the options Quiet, FixWithErrors, AllowLateBinding and InjectReferences. These options apply only to namespaces and classes specified by the script. There is no principal option.
+
+## Quiet Option
+
+|---|------------------------------------------------------------------------------|
+|`0` (default)|If the script contains errors, these are displayed in the Status Window. |
+|`1`|If the script contains errors, the errors are not shown in the Status Window.|
+
+## FixWithErrors Option
+
+|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+|`0`|If the script contains errors, `⎕FIX` fails with `DOMAIN ERROR` . |
+|`1` (default)|`⎕FIX` fixes all the namespaces and classes in the script regardless of any errors they might contain. |
+|`2`|If the script contains errors, `⎕FIX` displays a message box prompting the user to choose whether or not to fix all the offending namespaces and classes in the script.|
+
+## AllowLateBinding Option
+
+|---|---------------------------------------------------------------------------------------------------------------------|
+|`0` (default)|`⎕FIX` will only fix a class whose Base class (if specified) is defined in the script or is present in the workspace.|
+|`1`|`⎕FIX` will fix a class whose Base class is neither defined in the script nor present in the workspace. |
+
+## InjectReferences Option
+
+|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
+|`'All'` |In order to implement lexical scope, `⎕FIX` will insert internal references into all objects in the script. |
+|`'InClasses'` (default)|In order to implement lexical scope, `⎕FIX` will insert internal references ONLY into classes and sub-classes in the script, but not into namespaces.|
+|`'None'` |No internal references are inserted and lexical scope does not apply. |
+
+See [Lexical Scope in Scripts](../../../earlier-release-notes/release-notes-v19-0/introduction/lexical-scope-in-scripts).
+
+
Examples
+
+The following examples illustrate how different values of the InjectReferences option affect the scope of objects in scripts. The examples are based on the following family tree:
+
+
+
+Two scripts are defined to map this tree onto a structure of classes and namespaces. In this scheme, female family members are represented by classes and male family members by namespaces.
+
+So the scripted tree for `Pete` has a parent namespace:
+```apl
+:Namespace Pete
+ :Namespace Andy
+ :Class Aisha
+ :Access Public
+ :Endclass
+ :EndNamespace
+
+ :Class Katherine
+ :Access Public
+ :Namespace Woody
+ :EndNamespace
+ :Namespace George
+ :EndNamespace
+ :EndClass
+:EndNamespace
+```
+
+While the scripted tree for `Jill` has a parent class:
+```apl
+:Class Jill
+:Access Public
+ :Namespace Andy
+ :Class Aisha
+ :Access Public
+ :Endclass
+ :EndNamespace
+
+ :Class Katherine
+ :Access Public
+ :Namespace Woody
+ :EndNamespace
+ :Namespace George
+ :EndNamespace
+ :EndClass
+:EndClass
+```
+
+Using the `Pete` namespace, after executing the expression:
+```apl
+ 2(⎕FIX⍠'InjectReferences' 'All')⎕SRC Pete
+```
+
+- Code in `Pete` can refer to `Aisha` , `Andy` , `George` , `Katherine`, and `Woody`
+- Code in `Andy` can refer to `Aisha` and `Katherine`
+- ... and so forth.
+
+But after executing:
+```apl
+ 2(⎕FIX⍠'InjectReferences' 'InClasses')⎕SRC Pete
+```
+
+- Code in `Pete` can refer only to `Andy` and `Katherine`
+- Code in `Andy` can refer only to `Aisha`
+- ... and so forth.
+
+The following tables show which objects in namespace `Pete` can *see* (that is, refer to) which other objects representing members of the family, in each case; `All`, `InClasses` and `None`.
+
+|'All' |Pete |Andy |Aisha |Katherine|Woody |George|
+|---------|------|------|------|---------|------|------|
+|Pete | |✔ |✔ |✔ |✔ |✔ |
+|Andy | | |✔ |✔ | | |
+|Aisha |✔ |✔ |✔ | | | |
+|Katherine|✔ |✔ | |✔ |✔ |✔ |
+|Woody | | | | | |✔ |
+|George | | | | |✔ | |
+
+|'InClasses'|Pete |Andy |Aisha |Katherine|Woody |George|
+|-----------|------|------|------|---------|------|------|
+|Pete | |✔ | |✔ | | |
+|Andy | | |✔ | | | |
+|Aisha |✔ |✔ |✔ | | | |
+|Katherine |✔ |✔ | |✔ |✔ |✔ |
+|Woody | | | | | | |
+|George | | | | | | |
+
+|'None' |Pete |Andy |Aisha |Katherine|Woody |George|
+|---------|------|------|------|---------|------|------|
+|Pete | |✔ | |✔ | | |
+|Andy | | |✔ | | | |
+|Aisha | | | | | | |
+|Katherine| | | | | | |
+|Woody | | | | | | |
+|George | | | | | | |
+
+Whilst the next set of tables show the same for class `Jill`.
+
+|'All' |Jill |Andy |Aisha |Katherine|Woody |George|
+|---------|------|------|------|---------|------|------|
+|Jill |✔ |✔ |✔ |✔ |✔ |✔ |
+|Andy | | |✔ |✔ | | |
+|Aisha |✔ |✔ |✔ | | | |
+|Katherine|✔ |✔ | |✔ |✔ |✔ |
+|Woody | | | | | |✔ |
+|George | | | | |✔ | |
+
+|'InClasses'|Jill |Andy |Aisha |Katherine|Woody |George|
+|-----------|------|------|------|---------|------|------|
+|Jill |✔ |✔ |✔ |✔ |✔ |✔ |
+|Andy | | |✔ | | | |
+|Aisha |✔ |✔ |✔ | | | |
+|Katherine |✔ |✔ | |✔ |✔ |✔ |
+|Woody | | | | | | |
+|George | | | | | | |
+
+|'None' |Jill |Andy |Aisha |Katherine|Woody |George|
+|---------|------|------|------|---------|------|------|
+|Jill | | | | | | |
+|Andy | | |✔ | | | |
+|Aisha | | | | | | |
+|Katherine| | | | | | |
+|Woody | | | | | | |
+|George | | | | | | |
+
+
+
+ ⎕FIX FIX
+
diff --git a/language-reference-guide/docs/system-functions/fix.md b/language-reference-guide/docs/system-functions/fix-monadic.md
similarity index 60%
rename from language-reference-guide/docs/system-functions/fix.md
rename to language-reference-guide/docs/system-functions/fix-monadic.md
index 9115f36c99d..b90d617ad19 100644
--- a/language-reference-guide/docs/system-functions/fix.md
+++ b/language-reference-guide/docs/system-functions/fix-monadic.md
@@ -3,42 +3,29 @@ search:
boost: 2
---
-#
Fix Script `{R}←{X}⎕FIX Y`{{key}}
+#
Define Namespace `{R}←⎕FIX Y`{{key}}
-`⎕FIX` establishes Namespaces, Classes, Interfaces and functions from the script specified by `Y` in the workspace.
+`⎕FIX` establishes namespaces, classes, interfaces and functions from the script specified by `Y` in the workspace.
-In this section, the term *namespace* covers scripted Namespaces, Classes and Interfaces.
+To restrict what the script is allowed to establish, use [dyadic `⎕FIX`](fix-dyadic.md).
-`Y` may be a simple character vector, or a vector of character vectors or character scalars. The value of `X` determines what `Y` may contain.
+In this section, the term *namespace* covers scripted namespaces, classes and interfaces.
-If `Y` is a simple character vector, it must start with `file://`, followed by the name of a file which must exist. The contents of the file must follow the same rules that apply to `Y` when `Y` is a vector of character vectors or scalars. The file name can be relative or absolute; when considering cross-platform portability, using "/" as the directory delimiter is recommended, although "\" is also valid under Windows.
+`Y` can be a simple character vector, or a vector of character vectors or character scalars.
-If specified, `X` must be a numeric scalar. It may currently take the value `0`, `1` or `2`. If not specified, the value is assumed to be `1`.
+If `Y` is a simple character vector, it must be the name of a file which must exist. The contents of the file must follow the same rules that apply to `Y` when `Y` is a vector of character vectors or scalars. The file name can be relative or absolute; when considering cross-platform portability, using `/` as the directory delimiter is recommended, although `\` is also valid under Windows.
-If `X` is `0`, `Y` must specify a single valid *namespace* which may or may not be named, or a file containing such a definition. If so, the shy result `R` contains a reference to the *namespace*. Even if the *namespace* is named, it is not established *per se*, although it will exist for as long as at least one reference to it exists.
+`Y` must specify a single valid *namespace* which might or might not be named, or a file containing such a definition. The shy result `R` contains a reference to the *namespace*. If `Y` contains the definition of a named *namespace*, the *namespace* is established in the workspace.
-If `X` is `1`, `Y` must specify a single valid *namespace* which may or may not be named, or a file containing such a definition. If so, the shy result `R` contains a reference to the *namespace*. If `Y` contains the definition of a named *namespace*, the *namespace* is established in the workspace.
+
Examples
-If `X` is `2`, `Y` is either a character vector containing the name of a script file, or a vector of character vectors that represents a script.
-
-`Y` may specify a series of **named** *namespaces* or function definitions, or a combination of functions and namespaces.
-
-- If the script contains more than one item, tradfn definitions must be delimited by `∇`symbols.
-- Derived and assigned functions may be specified only within namespaces.
-
-In this case, the shy result `R` is a vector of character vectors, containing the names of all of the objects that have been established in the workspace; the order of the names in `R` is not defined. Currently `2 ⎕FIX` is not certain to be an atomic operation, although this might change in future versions.
-
-## Example 1
-
-In the first example, the Class specified by `Y` is *named* (`MyClass`) but the result of `⎕FIX` is discarded. The end-result is that `MyClass` is established in the workspace as a Class.
+In the first example, the class specified by `Y` is *named* (`MyClass`) but the result of `⎕FIX` is discarded. The end-result is that `MyClass` is established in the workspace as a class.
```apl
⎕←⎕FIX ':Class MyClass' ':EndClass'
#.MyClass
```
-## Example 2
-
-In the second example, the Class specified by `Y` is *named* (`MyClass`) and the result of `⎕FIX` is assigned to a different name (`MYREF`). The end-result is that a Class named `MyClass` is established in the workspace, and `MYREF` is a reference to it.
+In the second example, the class specified by `Y` is *named* (`MyClass`) and the result of `⎕FIX` is assigned to a different name (`MYREF`). The end-result is that a class named `MyClass` is established in the workspace, and `MYREF` is a reference to it.
```apl
MYREF←⎕FIX ':Class MyClass' ':EndClass'
)CLASSES
@@ -51,20 +38,7 @@ MyClass MYREF
1
```
-## Example 3
-
-In the third example, the left-argument of `0` causes the named Class `MyClass` to be visible only via the reference to it (`MYREF`). It is there, but hidden.
-```apl
- MYREF←0 ⎕FIX ':Class MyClass' ':EndClass'
- )CLASSES
-MYREF
- MYREF
-#.MyClass
-```
-
-## Example 4
-
-The fourth example illustrates the use of un-named Classes.
+The third example illustrates the use of un-named classes.
```apl
src←':Class' '∇Make n'
src,←'Access Public' 'Implements Constructor'
@@ -77,22 +51,6 @@ MYREF
Pete
```
-## Example 5
-
-In the final example, the left argument of `2` allows a script containing multiple objects to be fixed:
-
-```apl
-
- src←':Namespace andys' '∇foo' '2' '∇'
- src,←':EndNamespace' 'dfn←{⍺ ⍵}' '∇r←tfn'
- src,←'r←33' '∇' ':Class c1' '∇goo' '1'
- src,←'∇' ':EndClass'
- ≢⎕←2⎕FIX src
- c1 tfn dfn andys
-4
-
-```
-
## Restrictions
`⎕FIX` is unable to fix a namespace from `Y` when `Y` specifies a multi-line dfn which is preceded by a `⋄` (diamond separator).
@@ -109,43 +67,45 @@ DOMAIN ERROR: There were errors processing the script
## Variant Options
-`⎕FIX` may be applied using the Variant operator with the options Quiet, FixWithErrors, AllowLateBinding and InjectReferences. These options apply only to namespaces and classes specified by the script. There is no principal option.
+`⎕FIX` can be applied using the Variant operator with the options Quiet, FixWithErrors, AllowLateBinding and InjectReferences. These options apply only to namespaces and classes specified by the script. There is no principal option.
## Quiet Option
|---|------------------------------------------------------------------------------|
-|0 |If the script contains errors, these are displayed in the Status Window. |
+|`0` (default)|If the script contains errors, these are displayed in the Status Window. |
|`1`|If the script contains errors, the errors are not shown in the Status Window.|
## FixWithErrors Option
|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-|0 |If the script contains errors, `⎕FIX` fails with `DOMAIN ERROR` . |
-|`1`|`⎕FIX` fixes all the namespaces and classes in the script regardless of any errors they may contain. |
+|`0`|If the script contains errors, `⎕FIX` fails with `DOMAIN ERROR` . |
+|`1` (default)|`⎕FIX` fixes all the namespaces and classes in the script regardless of any errors they might contain. |
|`2`|If the script contains errors, `⎕FIX` displays a message box prompting the user to choose whether or not to fix all the offending namespaces and classes in the script.|
## AllowLateBinding Option
|---|---------------------------------------------------------------------------------------------------------------------|
-|0 |`⎕FIX` will only fix a Class whose Base class (if specified) is defined in the script or is present in the workspace.|
-|`1`|`⎕FIX` will fixes a Class whose Base class is neither defined in the script nor present in the workspace. |
+|`0` (default)|`⎕FIX` will only fix a class whose Base class (if specified) is defined in the script or is present in the workspace.|
+|`1`|`⎕FIX` will fix a class whose Base class is neither defined in the script nor present in the workspace. |
## InjectReferences Option
|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
|`'All'` |In order to implement lexical scope, `⎕FIX` will insert internal references into all objects in the script. |
-|'InClasses'|In order to implement lexical scope, `⎕FIX` will insert internal references ONLY into Classes and sub-classes in the script, but not into namespaces.|
+|`'InClasses'` (default)|In order to implement lexical scope, `⎕FIX` will insert internal references ONLY into classes and sub-classes in the script, but not into namespaces.|
|`'None'` |No internal references are inserted and lexical scope does not apply. |
See [Lexical Scope in Scripts](../../../earlier-release-notes/release-notes-v19-0/introduction/lexical-scope-in-scripts).
+
Examples
+
The following examples illustrate how different values of the InjectReferences option affect the scope of objects in scripts. The examples are based on the following family tree:

-Two scripts are defined to map this tree onto a structure of Classes and Namespaces. In this scheme, female family members are represented by Classes and male family members by Namespaces.
+Two scripts are defined to map this tree onto a structure of classes and namespaces. In this scheme, female family members are represented by classes and male family members by namespaces.
-So the scripted tree for `Pete` has a parent Namespace:
+So the scripted tree for `Pete` has a parent namespace:
```apl
:Namespace Pete
:Namespace Andy
@@ -164,7 +124,7 @@ So the scripted tree for `Pete` has a parent Namespace:
:EndNamespace
```
-While the scripted tree for `Jill` has a parent Class:
+While the scripted tree for `Jill` has a parent class:
```apl
:Class Jill
:Access Public
@@ -184,13 +144,13 @@ While the scripted tree for `Jill` has a parent Class:
:EndClass
```
-Using the `Pete` Namespace, after executing the expression:
+Using the `Pete` namespace, after executing the expression:
```apl
2(⎕FIX⍠'InjectReferences' 'All')⎕SRC Pete
```
-- Code in `Pete` may refer to `Aisha` , `Andy` , `George` , `Katherine`, and `Woody`
-- Code in `Andy` may refer to `Aisha` and `Katherine`
+- Code in `Pete` can refer to `Aisha` , `Andy` , `George` , `Katherine`, and `Woody`
+- Code in `Andy` can refer to `Aisha` and `Katherine`
- ... and so forth.
But after executing:
@@ -198,11 +158,11 @@ But after executing:
2(⎕FIX⍠'InjectReferences' 'InClasses')⎕SRC Pete
```
-- Code in `Pete` may refer only to `Andy` and `Katherine`
-- Code in `Andy` may refer only to `Aisha`
+- Code in `Pete` can refer only to `Andy` and `Katherine`
+- Code in `Andy` can refer only to `Aisha`
- ... and so forth.
-The following tables show which objects in Namespace `Pete` can *see* (that is, refer to) which other objects representing members of the family, in each case; `All`, `InClasses` and `None`.
+The following tables show which objects in namespace `Pete` can *see* (that is, refer to) which other objects representing members of the family, in each case; `All`, `InClasses` and `None`.
|'All' |Pete |Andy |Aisha |Katherine|Woody |George|
|---------|------|------|------|---------|------|------|
@@ -231,7 +191,7 @@ The following tables show which objects in Namespace `Pete` can *see* (that is,
|Woody | | | | | | |
|George | | | | | | |
-Whilst the next set of tables show the same for Class `Jill`.
+Whilst the next set of tables show the same for class `Jill`.
|'All' |Jill |Andy |Aisha |Katherine|Woody |George|
|---------|------|------|------|---------|------|------|
diff --git a/language-reference-guide/docs/system-functions/fresize-disambiguation.md b/language-reference-guide/docs/system-functions/fresize-disambiguation.md
new file mode 100644
index 00000000000..09908e67c4b
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/fresize-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+#
File Resize `⎕FRESIZE`
+
+## Monadic `⎕FRESIZE` means
+
+[Compact Component File](fresize-monadic.md)
+
+## Dyadic `⎕FRESIZE` means
+
+[Resize Component File](fresize-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/fresize.md b/language-reference-guide/docs/system-functions/fresize-dyadic.md
similarity index 79%
rename from language-reference-guide/docs/system-functions/fresize.md
rename to language-reference-guide/docs/system-functions/fresize-dyadic.md
index 32ea255ff71..94b276fbc9c 100644
--- a/language-reference-guide/docs/system-functions/fresize.md
+++ b/language-reference-guide/docs/system-functions/fresize-dyadic.md
@@ -3,7 +3,7 @@ search:
boost: 2
---
-#
File Resize `{R}←{X}⎕FRESIZE Y`{{key}}
+#
Resize Component File `{R}←X ⎕FRESIZE Y`{{key}}
## Access code 1024
@@ -11,7 +11,7 @@ search:
`X` is an integer that specifies the maximum permitted size of the file in bytes. The value 0 means the maximum possible size of file.
-An attempt to update a component file that would cause it to exceed its maximum size will fail with a `FILE FULL` error (21). A side effect of `⎕FRESIZE` is to cause the file to be compacted. This process removes any gaps in the file caused by replacing a component with a shorter array. Any interrupt entered at the keyboard during the compaction is ignored. Note that if the left argument is omitted, the file is simply compacted and the maximum file size remains unchanged.
+An attempt to update a component file that would cause it to exceed its maximum size will fail with a `FILE FULL` error (21). A side effect of `⎕FRESIZE` is to cause the file to be [compacted](fresize-monadic.md). This process removes any gaps in the file caused by replacing a component with a shorter array. Any interrupt entered at the keyboard during the compaction is ignored.
During compaction, the file is restructured by reordering the components and by amalgamating the free areas at the end of the file. The file is then truncated and excess disk space is released back to the operating system. For a large file with many components, this process may take a significant time.
@@ -31,7 +31,6 @@ FILE FULL
(10 1000⍴1.1)⎕FAPPEND 1
∧
- ⎕FRESIZE 1 ⍝ Force file compaction.
```
!!! Info "Information"
diff --git a/language-reference-guide/docs/system-functions/fresize-monadic.md b/language-reference-guide/docs/system-functions/fresize-monadic.md
new file mode 100644
index 00000000000..aa088cab07b
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/fresize-monadic.md
@@ -0,0 +1,38 @@
+---
+search:
+ boost: 2
+---
+
+#
Compact Component File `{R}←⎕FRESIZE Y`{{key}}
+
+## Access code 1024
+
+`Y` must be a simple integer scalar or 1 or 2 element vector containing the file tie number followed by an optional passnumber. If the passnumber is omitted it is assumed to be zero.
+
+An attempt to update a component file that would cause it to exceed its [maximum size](fresize-dyadic.md) will fail with a `FILE FULL` error (21). `⎕FRESIZE` compacts the file. This process removes any gaps in the file caused by replacing a component with a shorter array. Any interrupt entered at the keyboard during the compaction is ignored.
+
+During compaction, the file is restructured by reordering the components and by amalgamating the free areas at the end of the file. The file is then truncated and excess disk space is released back to the operating system. For a large file with many components, this process may take a significant time.
+
+The shy result of `⎕FRESIZE` is the tie number of the file.
+
+
Example
+```apl
+ 'test'⎕FCREATE 1 ⋄ ⎕FSIZE 1
+1 1 304 1.844674407E19
+ (10 1000⍴1.1)⎕FAPPEND 1 ⋄ ⎕FSIZE 1
+1 2 81104 1.844674407E19
+ (10 1000⍴1.1)⎕FAPPEND 1 ⋄ ⎕FSIZE 1
+1 3 161240 1.844674407E19
+ ⎕FDROP 1 1 ⋄ ⎕FSIZE 1
+2 3 161312 1.844674407E19
+ ⎕FRESIZE 1 ⋄ ⎕FSIZE 1
+2 3 80568 1.844674407E19
+```
+
+!!! Info "Information"
+ Component files that have both journalling and checksum properties set to `0` have been deprecated; from Dyalog v21.0, component files with this combination of properties will be read-only. Dyalog Ltd recommends using `⎕FPROPS` to convert any such files to have different properties. For information on how to identify component files that have both journalling and checksum properties set to `0` in your existing codebase, see the [Release Notes](../../../release-notes/announcements/deprecated-functionality/).
+
+
+
+ ⎕FRESIZE FRESIZE
+
diff --git a/language-reference-guide/docs/system-functions/index.md b/language-reference-guide/docs/system-functions/index.md
index 24fa73a42a9..e7ef5a1daed 100644
--- a/language-reference-guide/docs/system-functions/index.md
+++ b/language-reference-guide/docs/system-functions/index.md
@@ -19,19 +19,23 @@ Dyalog includes a collection of built-in facilities that provide various service
|[`⎕AN`](an.md) |Account Name |Constant|
|[`⎕ARBIN`](arbin.md) |Arbitrary Input |Dyadic function|
|[`⎕ARBOUT`](arbout.md)|Arbitrary Output |Dyadic function|
-|[`⎕AT`](at.md) |Object Attributes |Ambivalent function|
+|[`⎕AT`](at-monadic.md)|Object Attributes |Monadic function |
+|[`⎕AT`](at-dyadic.md)|Object Attributes for APL2|Dyadic function |
|[`⎕ATX`](atx.md) |Extended Attributes |Dyadic function|
|[`⎕AV`](av.md) |Atomic Vector |Constant|
|[`⎕AVU`](avu.md) |Atomic Vector - Unicode |Variable|
|[`⎕BASE`](base.md) |Base Class |Reference|
-|[`⎕C`](c.md) |Case Convert |Ambivalent function|
-|[`⎕CLASS`](class.md) |Class |Monadic function|
+|[`⎕C`](c-monadic.md)|Case Fold |Monadic function |
+|[`⎕C`](c-dyadic.md)|Case Map |Dyadic function |
+|[`⎕CLASS`](class-monadic.md)|Class Hierarchy|Monadic function|
+|[`⎕CLASS`](class-dyadic.md)|Get Class/Interface Implementation|Dyadic function |
|[`⎕CLEAR`](clear.md)|Clear workspace (WS) |Constant|
|[`⎕CMD`](execute-windows-command.md) |Execute the Windows Command Processor or another program|Monadic function|
|[`⎕CMD`](start-windows-auxiliary-processor.md) |Start a Windows Auxiliary Processor|Dyadic function|
|[`⎕CR`](cr.md) |Canonical Representation|Monadic function|
|[`⎕CS`](cs.md) |Change Space |Monadic function|
-|[`⎕CSV`](csv.md) |Comma Separated Values |Ambivalent function|
+|[`⎕CSV`](csv-monadic.md)|Import CSV |Monadic function |
+|[`⎕CSV`](csv-dyadic.md)|Export CSV |Dyadic function |
|[`⎕CT`](ct.md) |Comparison Tolerance |Variable|
|[`⎕CY`](cy.md) |Copy objects into active WS|Function|
|[`⎕D`](d.md) |Digits |Variable|
@@ -45,23 +49,28 @@ Dyalog includes a collection of built-in facilities that provide various service
|[`⎕DR`](data-representation-dyadic.md) |Data Representation (Dyadic) |Ambivalent function|
|[`⎕DR`](data-representation-monadic.md) |Data Representation (Monadic)|Ambivalent function|
|[`⎕DT`](dt.md) |Datetime |Dyadic function|
-|[`⎕ED`](ed.md) |Edit one or more objects|Ambivalent function|
+|[`⎕ED`](ed-monadic.md)|Edit Objects |Monadic function |
+|[`⎕ED`](ed-dyadic.md)|Edit Objects with Type |Dyadic function |
|[`⎕EM`](em.md) |Event Messages |Monadic function|
|[`⎕EN`](en.md) |Event Number |Constant|
|[`⎕EX`](ex.md) |Expunge objects |Monadic function|
|[`⎕EX`](ex.md) |Expunge objects |Monadic function|
|[`⎕EXCEPTION`](exception.md)|Reports the most recent Microsoft .NET Exception|Reference|
-|[`⎕EXPORT`](export.md)|Export objects |Ambivalent function|
+|[`⎕EXPORT`](export-monadic.md)|Query Export Type |Monadic function |
+|[`⎕EXPORT`](export-dyadic.md)|Set Export Type |Dyadic function |
|[`⎕FAPPEND`](fappend.md) |Append a component to File |Dyadic function|
|[`⎕FAVAIL`](favail.md) |File system Availability |Constant|
-|[`⎕FCHK`](fchk.md) |File Check and Repair |Ambivalent function|
+|[`⎕FCHK`](fchk-monadic.md)|Check/Repair Component File|Monadic function |
+|[`⎕FCHK`](fchk-dyadic.md)|Custom Check/Repair Component File|Dyadic function |
|[`⎕FCOPY`](fcopy.md) |Copy a File |Dyadic function|
|[`⎕FCREATE`](fcreate.md) |Create a File |Dyadic function|
|[`⎕FDROP`](fdrop.md) |Drop a block of components |Dyadic function|
|[`⎕FERASE`](ferase.md) |Erase a File |Dyadic function|
|[`⎕FHIST`](fhist.md) |File History |Monadic function|
-|[`⎕FHOLD`](fhold.md) |File Hold |Ambivalent function|
-|[`⎕FIX`](fix.md) |Fix |Ambivalent function|
+|[`⎕FHOLD`](fhold-monadic.md)|Component File Hold |Monadic function |
+|[`⎕FHOLD`](fhold-dyadic.md)|Component File Hold with Timeout|Dyadic function |
+|[`⎕FIX`](fix-monadic.md)|Define Namespace|Monadic function |
+|[`⎕FIX`](fix-dyadic.md)|Define Objects|Dyadic function |
|[`⎕FLIB`](flib.md) |List File Library |Monadic function|
|[`⎕FMT`](format-dyadic.md) |Format array |Dyadic function|
|[`⎕FMT`](format-monadic.md) |Resolve display |Monadic function|
@@ -74,7 +83,8 @@ Dyalog includes a collection of built-in facilities that provide various service
|[`⎕FREAD`](fread.md) |Read a component from File |Monadic function|
|[`⎕FRENAME`](frename.md) |Rename a File |Dyadic function|
|[`⎕FREPLACE`](freplace.md)|Replace a component on File|Dyadic function|
-|[`⎕FRESIZE`](fresize.md) |File Resize |Ambivalent function|
+|[`⎕FRESIZE`](fresize-monadic.md)|Compact Component File |Monadic function |
+|[`⎕FRESIZE`](fresize-dyadic.md)|Resize Component File |Dyadic function |
|[`⎕FSIZE`](fsize.md) |File Size |Monadic function|
|[`⎕FSTAC`](fstac.md) |Set File Access matrix |Dyadic function|
|[`⎕FSTIE`](fstie.md) |Share-Tie a File |Dyadic function|
@@ -83,55 +93,70 @@ Dyalog includes a collection of built-in facilities that provide various service
|[`⎕FX`](fx.md) |Fix definition |Monadic function|
|[`⎕INSTANCES`](instances.md)|Instances|Monadic function|
|[`⎕IO`](io.md) |Index Origin |Variable|
-|[`⎕JSON`](json.md) |JSON Convert |Ambivalent function|
+|[`⎕JSON`](json-monadic.md)|Auto-convert JSON |Monadic function |
+|[`⎕JSON`](json-dyadic.md)|Convert JSON |Dyadic function |
|[`⎕KL`](kl.md) |Key Labels |Monadic function|
|[`⎕LC`](lc.md) |Line Count |Constant|
|[`⎕LOAD`](load.md) |Load a saved WS |Function|
-|[`⎕LOCK`](lock.md) |Lock a function |Ambivalent function|
+|[`⎕LOCK`](lock-monadic.md)|Lock Function |Monadic function |
+|[`⎕LOCK`](lock-dyadic.md)|Custom Lock Function |Dyadic function |
|[`⎕LX`](lx.md) |Latent Expression |Variable|
-|[`⎕MAP`](map.md) |Map a file |Ambivalent function|
-|[`⎕MKDIR`](mkdir.md) |Create a directory |Ambivalent function|
+|[`⎕MAP`](map-monadic.md)|Map Array File |Monadic function |
+|[`⎕MAP`](map-dyadic.md)|Map Raw Data File |Dyadic function |
+|[`⎕MKDIR`](mkdir-monadic.md)|Create Directory |Monadic function |
+|[`⎕MKDIR`](mkdir-dyadic.md)|Custom Create Directory |Dyadic function |
|[`⎕ML`](ml.md) |Migration Level |Variable|
|[`⎕MONITOR`](query-monitor.md)|Monitor query|Monadic function|
|[`⎕MONITOR`](set-monitor.md)|Monitor set |Dyadic function|
-|[`⎕NA`](na.md) |Declare a DLL function |Ambivalent function|
+|[`⎕NA`](na-monadic.md)|Associate External Function with Own Name |Monadic function |
+|[`⎕NA`](na-dyadic.md)|Associate External Function with Custom Name |Dyadic function |
|[`⎕NAPPEND`](nappend.md) |Append to File |Dyadic function|
|[`⎕NC`](nc.md) |Name Classification |Monadic function|
|[`⎕NCOPY`](ncopy.md) |Copy files and directories |Dyadic function|
|[`⎕NCREATE`](ncreate.md) |Create a File |Dyadic function|
-|[`⎕NDELETE`](ndelete.md) |Delete a File or Directory |Ambivalent function|
+|[`⎕NDELETE`](ndelete-monadic.md)|Delete Native File |Monadic function |
+|[`⎕NDELETE`](ndelete-dyadic.md)|Custom Delete Native File |Dyadic function |
|[`⎕NERASE`](nerase.md) |Erase a File |Dyadic function|
|[`⎕NEW`](new.md) |New Instance |Monadic function|
|[`⎕NEXISTS`](nexists.md) |Discover whether or not a file or directory exists |Monadic function|
-|[`⎕NGET`](nget.md) |Read Text File |Ambivalent function|
-|[`⎕NINFO`](ninfo.md) |Query or set information about one or more files and/or directories|Ambivalent function|
-|[`⎕NL`](nl.md) |Name List |Monadic function|
+|[`⎕NGET`](nget-monadic.md)|Get Text File Content |Monadic function |
+|[`⎕NGET`](nget-dyadic.md)|Decode Text File Content |Dyadic function |
+|[`⎕NINFO`](ninfo-monadic.md)|Native File Name |Monadic function |
+|[`⎕NINFO`](ninfo-dyadic.md)|Native File Information |Dyadic function |
+|[`⎕NL`](nl-monadic.md)|List Object Names |Monadic function|
+|[`⎕NL`](nl-dyadic.md)|List Object Names with Filter|Dyadic function |
|[`⎕NLOCK`](nlock.md) |Lock a region of a file |Dyadic function|
|[`⎕NMOVE`](nmove.md) |Move files and directories |Dyadic function|
|[`⎕NNAMES`](nnames.md) |Names of tied Files |Constant|
|[`⎕NNUMS`](nnums.md) |Tie Numbers of tied Files |Constant|
-|[`⎕NPARTS`](nparts.md) |Split a file name into its constituent parts. |Ambivalent function|
+|[`⎕NPARTS`](nparts-monadic.md)|File Name Parts |Monadic function |
+|[`⎕NPARTS`](nparts-dyadic.md)|Normalised File Name Parts |Dyadic function |
|[`⎕NPUT`](nput.md) |Write Text File |Dyadic function|
-|[`⎕NQ`](nq.md) |Place an event on the Queue|Ambivalent function|
+|[`⎕NQ`](nq-monadic.md)|Enqueue Event |Monadic function |
+|[`⎕NQ`](nq-dyadic.md)|Custom Enqueue Event |Dyadic function |
|[`⎕NR`](nr.md) |Nested Representation |Monadic function|
|[`⎕NREAD`](nread.md) |Read from File |Monadic function|
|[`⎕NRENAME`](nrename.md) |Rename a File |Dyadic function|
|[`⎕NREPLACE`](nreplace.md)|Replace data on File |Dyadic function|
|[`⎕NRESIZE`](nresize.md) |File Resize |Dyadic function|
-|[`⎕NS`](ns.md) |Namespace |Ambivalent function|
+|[`⎕NS`](ns-monadic.md)|Create/Clone Namespace|Monadic function |
+|[`⎕NS`](ns-dyadic.md)|Create/Clone Custom Namespaces|Dyadic function |
|[`⎕NSI`](nsi.md) |Namespace Indicator |Constant|
|[`⎕NSIZE`](nsize.md) |File Size |Monadic function|
|[`⎕NTIE`](ntie.md) |Tie a File exclusively |Dyadic function|
|[`⎕NULL`](null.md)|Null Item |Variable|
|[`⎕NUNTIE`](nuntie.md) |Untie Files |Monadic function|
-|[`⎕NXLATE`](nxlate.md) |Specify Translation Table |Ambivalent function|
+|[`⎕NXLATE`](nxlate-monadic.md)|Query Native File Translation Vector|Monadic function |
+|[`⎕NXLATE`](nxlate-dyadic.md)|Set Native File Translation Vector|Dyadic function |
|[`⎕OFF`](off.md) |End the session |Constant|
|[`⎕OPT`](or.md) |Variant |Dyadic operator|
|[`⎕OR`](or.md) |Object Representation |Monadic function|
|[`⎕PATH`](path.md) |Search Path |Variable|
-|[`⎕PFKEY`](pfkey.md)|Programmable Function Keys |Ambivalent function|
+|[`⎕PFKEY`](pfkey-monadic.md)|Query Programmable Function Key|Monadic function |
+|[`⎕PFKEY`](pfkey-dyadic.md)|Program Function Key |Dyadic function |
|[`⎕PP`](pp.md) |Print Precision |Variable|
-|[`⎕PROFILE`](profile.md)|Profile Application|Ambivalent function|
+|[`⎕PROFILE`](profile-monadic.md)|Profile Code |Monadic function |
+|[`⎕PROFILE`](profile-dyadic.md)|Filter Profile Data|Dyadic function |
|[`⎕R`](r.md) |Replace |Dyadic operator|
|[`⎕REFS`](refs.md) |Local References |Monadic function|
|[`⎕RL`](rl.md) |Random Link |Variable|
@@ -147,10 +172,12 @@ Dyalog includes a collection of built-in facilities that provide various service
|[`⎕SHADOW`](shadow.md)|Shadow names |Monadic function|
|[`⎕SHELL`](shell.md)|Execute a shell command or another program |Monadic function|
|[`⎕SI`](si.md) |State Indicator |Constant|
-|[`⎕SIGNAL`](signal.md) |Signal event |Ambivalent function|
+|[`⎕SIGNAL`](signal-monadic.md)|Signal Default/Custom Event |Monadic function |
+|[`⎕SIGNAL`](signal-dyadic.md)|Signal Event with Custom Name |Dyadic function |
|[`⎕SIZE`](size.md) |Size of objects |Monadic function|
|[`⎕SM`](sm.md) |Screen Map |Variable|
-|[`⎕SR`](sr.md) |Screen Read |Ambivalent function|
+|[`⎕SR`](sr-monadic.md)|Screen Read |Monadic function |
+|[`⎕SR`](sr-dyadic.md)|Custom Screen Read |Dyadic function |
|[`⎕SRC`](src.md) |Source |Monadic function|
|[`⎕STACK`](stack.md) |Report Stack |Constant|
|[`⎕STATE`](state.md) |Return State of an object|Monadic function|
@@ -164,37 +191,50 @@ Dyalog includes a collection of built-in facilities that provide various service
|[`⎕SVR`](svr.md)|Retract offer |Monadic function|
|[`⎕SVS`](svs.md)|Query Shared Variable State|Monadic function|
|[`⎕SYSTEM`](system.md)|System Information|Reference|
-|[`⎕TALLOC`](talloc.md)|Allocate Token Range|Ambivalent function|
+|[`⎕TALLOC`](talloc-monadic.md)|Allocate New Token Range|Monadic function |
+|[`⎕TALLOC`](talloc-dyadic.md)|Allocate Existing Token Range|Dyadic function |
|[`⎕TC`](tc.md) |Terminal Control |Constant|
|[`⎕TCNUMS`](tcnums.md) |Thread Child Numbers |Monadic function|
-|[`⎕TGET`](tget.md) |Get Tokens |Ambivalent function|
+|[`⎕TGET`](tget-monadic.md)|Get Tokens |Monadic function |
+|[`⎕TGET`](tget-dyadic.md)|Get Tokens with Timeout|Dyadic function |
|[`⎕THIS`](this.md) |Self-reference|Reference|
|[`⎕TID`](tid.md) |Current Thread Identity |Constant|
-|[`⎕TKILL`](tkill.md) |Kill Threads |Ambivalent function|
+|[`⎕TKILL`](tkill-monadic.md)|Kill Threads |Monadic function |
+|[`⎕TKILL`](tkill-dyadic.md)|Kill Threads and Descendants|Dyadic function |
|[`⎕TNAME`](tname.md) |Current Thread Name |Variable|
|[`⎕TNUMS`](tnums.md) |Thread Numbers |Constant|
|[`⎕TPOOL`](tpool.md) |Token Pool |Monadic function|
-|[`⎕TPUT`](tput.md) |Put Tokens |Ambivalent function|
+|[`⎕TPUT`](tput-monadic.md)|Put Tokens |Monadic function |
+|[`⎕TPUT`](tput-dyadic.md)|Put Tokens with Values|Dyadic function |
|[`⎕TRACE`](query-trace.md) |Query Trace vector|Monadic function|
|[`⎕TRACE`](set-trace.md) |Set Trace vector |Dyadic function|
|[`⎕TRAP`](trap.md) |Event Trap |Variable|
|[`⎕TREQ`](treq.md) |Token Requests |Monadic function|
|[`⎕TS`](ts.md) |Timestamp |Constant|
|[`⎕TSYNC`](tsync.md) |Wait for Threads to Terminate|Monadic function|
-|[`⎕UCS`](ucs.md) |Unicode Convert |Ambivalent function|
+|[`⎕UCS`](ucs-monadic.md)|Convert Unicode Code Point |Monadic function |
+|[`⎕UCS`](ucs-dyadic.md)|Convert Unicode Representation |Dyadic function |
|[`⎕USING`](using.md)|Microsoft .NET Search Path |Variable|
-|[`⎕VFI`](vfi.md) |Verify and Fix numeric |Ambivalent function|
-|[`⎕VGET`](vget.md) |Value Get |Ambivalent function|
+|[`⎕VFI`](vfi-monadic.md)|Parse Numbers |Monadic function |
+|[`⎕VFI`](vfi-dyadic.md)|Parse Numbers with Separators |Dyadic function |
+|[`⎕VGET`](vget-monadic.md)|Get Value from Current Namespace|Monadic function |
+|[`⎕VGET`](vget-dyadic.md)|Get Value from Namespace|Dyadic function |
|[`⎕VR`](vr.md) |Vector Representation |Monadic function|
-|[`⎕VSET`](vset.md) |Value Set |Ambivalent function|
+|[`⎕VSET`](vset-monadic.md)|Set Value in Current Namespace|Monadic function |
+|[`⎕VSET`](vset-dyadic.md)|Set Value in Namespace|Dyadic function |
|[`⎕WA`](wa.md) |Workspace Available |Constant|
-|[`⎕WC`](wc.md) |Create GUI object |Ambivalent function|
-|[`⎕WG`](wg.md) |Get GUI object properties |Ambivalent function|
-|[`⎕WN`](wn.md) |Query GUI object Names |Ambivalent function|
-|[`⎕WS`](ws.md) |Set GUI object properties |Ambivalent function|
+|[`⎕WC`](wc-monadic.md)|Convert Namespace to GUI Object|Monadic function |
+|[`⎕WC`](wc-dyadic.md)|Create GUI Object |Dyadic function |
+|[`⎕WG`](wg-monadic.md)|Get Properties of Current GUI Object|Monadic function |
+|[`⎕WG`](wg-dyadic.md)|Get Properties of GUI Object|Dyadic function |
+|[`⎕WN`](wn-monadic.md)|Get GUI Child Names in Current Object|Monadic function |
+|[`⎕WN`](wn-dyadic.md)|Get GUI Child Names in Parent Object|Dyadic function |
+|[`⎕WS`](ws-monadic.md)|Set Properties of Current GUI Object|Monadic function |
+|[`⎕WS`](ws-dyadic.md)|Set Properties of GUI Object|Dyadic function |
|[`⎕WSID`](wsid.md) |Workspace Identification|Variable|
|[`⎕WX`](wx.md) |Expose GUI property names |Variable|
-|[`⎕XML`](xml.md) |XML Convert |Ambivalent function|
+|[`⎕XML`](xml-monadic.md)|Convert XML |Monadic function |
+|[`⎕XML`](xml-dyadic.md)|Custom Convert XML |Dyadic function |
|[`⎕XSI`](xsi.md) |Extended State Indicator |Constant|
|[`⎕XT`](query-external-variable.md) |Query External variable |Monadic function|
|[`⎕XT`](set-external-variable.md) |Associate External variable|Dyadic function|
diff --git a/language-reference-guide/docs/system-functions/json-disambiguation.md b/language-reference-guide/docs/system-functions/json-disambiguation.md
new file mode 100644
index 00000000000..b1552116e1b
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/json-disambiguation.md
@@ -0,0 +1,22 @@
+---
+search:
+ exclude: true
+---
+
+#
JSON Convert `⎕JSON`
+
+## Monadic `⎕JSON` means
+
+[Auto-convert JSON](json-monadic.md)
+```apl
+ ⎕JSON '[1,2,3]'
+1 2 3
+```
+
+## Dyadic `⎕JSON` means
+
+[Convert JSON](json-dyadic.md)
+```apl
+ 1 ⎕JSON 1 2 3
+[1,2,3]
+```
diff --git a/language-reference-guide/docs/system-functions/json.md b/language-reference-guide/docs/system-functions/json-dyadic.md
similarity index 93%
rename from language-reference-guide/docs/system-functions/json.md
rename to language-reference-guide/docs/system-functions/json-dyadic.md
index 1cff653d053..1b20522e77b 100644
--- a/language-reference-guide/docs/system-functions/json.md
+++ b/language-reference-guide/docs/system-functions/json-dyadic.md
@@ -3,13 +3,13 @@ search:
boost: 2
---
-#
JSON Convert `R←{X}⎕JSON Y`{{key}}
+#
Convert JSON `R←X ⎕JSON Y`{{key}}
This function imports and exports data in [JavaScript Object Notation](https://www.json.org/json-en.html) (JSON) data interchange format.
## Syntax
-If `X` is specified (that is, `⎕JSON` is called dyadically), it must be a numeric scalar with the value `0` for import or `1` for export.
+`X` must be a numeric scalar with the value `0` for import or `1` for export.
Examples
@@ -27,11 +27,6 @@ Exporting APL data to JSON:
!!! Hint "Hints and Recommendations"
As a mnemonic, think of `X` as specifying the desired "JSON-ness": `0` means "no JSON", that is, converting away from JSON; `1` means "yes JSON", that is, converting towards JSON.
-If `X` is not specified (that is, `⎕JSON` is called monadically), its assumed value depends on `Y`: If `Y` is a character array, `X` is assumed to be `0`; otherwise it is assumed to be `1`.
-
-!!! Warning "Warning"
- Dyalog Ltd strongly recommends that `X` should always be specified to avoid code that seemingly works, only to fail on specific values.
-
`⎕JSON` has six [variant options](#variant-options): **Format**, **Compact**, **Null**, **HighRank**, **Charset**, and **Dialect**, specified using [`⍠`](../primitive-operators/variant.md). The principal option is **Format**.
## Limitations
@@ -88,7 +83,7 @@ For details and more examples, see [Export from Data](#export-from-data) and [Ex
## Name Mangling
-When `⎕JSON` converts a JSON document to APL data and a member of a JSON object has a name that is not a valid APL name, the member is renamed using a name mangling algorithm. This results in a name that begins with `⍙`. Any characters that cannot be part of an APL name are replaced with their [decimal Unicode code point](ucs.md#monadic-ucs) surrounded by `⍙`s.
+When `⎕JSON` converts a JSON document to APL data and a member of a JSON object has a name that is not a valid APL name, the member is renamed using a name mangling algorithm. This results in a name that begins with `⍙`. Any characters that cannot be part of an APL name are replaced with their [decimal Unicode code point](ucs-monadic.md) surrounded by `⍙`s.
Example
@@ -243,8 +238,6 @@ The two ways to represent JSON
nulls:
││null││ │ │
│└────┘│ │ │
└──────┴─┴─┘
- 0(⎕JSON⍠'Null'⎕NULL)'[null,2,3]'
- [Null] 2 3
```
#### Import to Matrix
@@ -282,7 +275,6 @@ Note that:
Example
This example uses the character vector `json` from the previous example:
-
```apl
json
{
@@ -407,19 +399,6 @@ If there are any mismatches between the values in `Y[;3]` and the types in `Y[;4
Example
-```apl
- m←0(⎕JSON⍠'M')'{"values": [ 75, 300 ]}'
- m
-┌─┬──────┬───┬─┐
-│0│ │ │1│
-├─┼──────┼───┼─┤
-│1│values│ │2│
-├─┼──────┼───┼─┤
-│2│ │75 │3│
-├─┼──────┼───┼─┤
-│2│ │300│3│
-└─┴──────┴───┴─┘
-```
To illustrate type mismatches, the above matrix is modified by replacing one number with a character vector that looks the same:
```apl
m[3;3]←⊂'75'
@@ -452,19 +431,6 @@ On export, the result is shortened by usage of identifiers without quotes, singl
```apl
1 ⎕JSON(a:'é"')
{"a":"é\""}
- 1(⎕JSON⍠'Dialect' 'JSON5')(a:'é"')
-{a:'é"'}
-
- 1(⎕JSON⍠'Charset' 'ASCII'⍠'Compact' 0)(a:'é"')
-{
- "a": "\u00E9\""
-}
- 1(⎕JSON⍠'Charset' 'ASCII'⍠'Compact' 0⍠'Dialect' 'JSON5')(a:'é"')
-{
- a: '\xE9"',
-}
-
- 0(⎕JSON⍠'Dialect' 'JSON5')['["a\'
'bc",'
'//:)'
'+.1,'
@@ -491,15 +457,10 @@ The **Null** variant option selects how JSON
null<
││null│││null││
│└────┘│└────┘│
└──────┴──────┘
- 0(⎕JSON⍠'Null'⎕NULL)'[null,null]'
- [Null] [Null]
-
1 ⎕JSON ⎕NULL ⎕NULL
DOMAIN ERROR: JSON export: item "[1]" of the right argument (⎕IO=1) cannot be converted
1 ⎕JSON ⎕NULL ⎕NULL
∧
- 1(⎕JSON⍠'Null'⎕NULL)⎕NULL ⎕NULL
-[null,null]
```
### Variant Option: Compact
@@ -580,8 +541,6 @@ The **Charset** variant option can be used to either allow Unicode in the genera
DÉ
1 ⎕JSON ns
{"dé":"DÉ"}
- 1(⎕JSON⍠'Charset' 'ASCII')ns
-{"d\u00E9":"D\u00C9"}
```
### Variant Option: HighRank
@@ -609,8 +568,6 @@ If **HighRank** is `'Error'` (the default), `⎕JSON` will signal a `DOMAIN ERRO
DOMAIN ERROR: JSON export: the right argument cannot be converted (⎕IO=1)
1 ⎕JSON d
∧
- 1(⎕JSON⍠'HighRank' 'Split')d
-[[[[1,2],"AB"],["ABC","DEF"]],[[[1,2,3],[4,5,6]],[[[1,4],[9,16]],[[25,36],[49,64]]]]]
```
## Wrappers
@@ -779,21 +736,13 @@ All wrapper invocations produce the same array of objects (except for trailing s
[{"item":"Knife","price":3,"qty":23},{"item":"Fork","price":4,"qty":45},{"item":"Spoon","price":5,"qty":67}]
1 ⎕JSON⊂4(invertedTable header)
[{"item":"Knife","price":3,"qty":23},{"item":"Fork","price":4,"qty":45},{"item":"Spoon","price":5,"qty":67}]
- 1(⎕JSON⍠'HighRank' 'Split')⊂4(invertedTable2 header)
-[{"item":"Knife","price":3,"qty":23},{"item":"Fork ","price":4,"qty":45},{"item":"Spoon","price":5,"qty":67}]
```
Without their wrappers, each APL structure *can* be represented in JSON, though this is not a common way to represent a dataset:
```apl
- 1(⎕JSON⍠'HighRank' 'Split')singleMatrix
-[["item","price","qty"],["Knife",3,23],["Fork",4,45],["Spoon",5,67]]
- 1(⎕JSON⍠'HighRank' 'Split')valueMatrix header
-[[["Knife",3,23],["Fork",4,45],["Spoon",5,67]],["item","price","qty"]]
1 ⎕JSON invertedTable header
[[["Knife","Fork","Spoon"],[3,4,5],[23,45,67]],["item","price","qty"]]
- 1(⎕JSON⍠'HighRank' 'Split')invertedTable2 header
-[[["Knife","Fork ","Spoon"],[3,4,5],[23,45,67]],["item","price","qty"]]
```
### Selection of a Subset
diff --git a/language-reference-guide/docs/system-functions/json-monadic.md b/language-reference-guide/docs/system-functions/json-monadic.md
new file mode 100644
index 00000000000..56c0ddb21c5
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/json-monadic.md
@@ -0,0 +1,759 @@
+---
+search:
+ boost: 2
+---
+
+# Auto-convert JSON `R←⎕JSON Y`{{key}}
+
+This function imports and exports data in [JavaScript Object Notation](https://www.json.org/json-en.html) (JSON) data interchange format.
+
+!!! Warning "Warning"
+ Dyalog Ltd strongly recommends [specifying the direction explicitly](json-dyadic.md) to avoid code that seemingly works, only to fail on specific values.
+
+## Syntax
+
+The direction of conversion depends on `Y`: if `Y` is a character array it is imported, that is, converted from JSON; otherwise it is exported, that is, converted to JSON.
+
+Examples
+
+Importing a JSON document to APL:
+```apl
+ ⎕JSON'[1,-2,3]'
+1 ¯2 3
+```
+Exporting APL data to JSON:
+```apl
+ ⎕JSON 1 ¯2 3
+[1,-2,3]
+```
+
+`⎕JSON` has six [variant options](#variant-options): **Format**, **Compact**, **Null**, **HighRank**, **Charset**, and **Dialect**, specified using [`⍠`](../primitive-operators/variant.md). The principal option is **Format**.
+
+## Limitations
+
+JSON supports a limited number of data types, and there is no direct correspondence between JSON and APL data structures. In particular:
+
+- JSON does not support arrays with rank > 1.
+- JSON does not support nested scalars.
+- JSON includes Boolean values true and false which are distinct from numeric values 1 and 0; these have no direct APL equivalent.
+- JSON object members are named and these names might not be [valid names in APL](../../programming-reference-guide/introduction/names/).
+- The [JSON5](https://json5.org/) dialect includes numeric constants Infinity, -Infinity, and NaN, which have no direct APL equivalent.
+
+These differences are catered for in various ways as discussed below.
+
+## JSON Import
+
+When importing, the JSON document `Y` is converted to the corresponding APL data `R`.
+
+`Y` is a character scalar, vector, or matrix in JSON format. There is an implied newline character between each row of a matrix.
+
+By default, `R` is APL data, possibly containing sub-arrays and/or sub-namespaces. If the variant option [**Format**](#variant-option-format) is set to `'M'`, `R` is instead a matrix that represents the JSON structure.
+
+The [JSON standard](https://www.rfc-editor.org/info/rfc8259/#section-4) states that members of a JSON object should have unique names and that implementations vary in how they treat duplicates. Dyalog does not error on duplicates, but their handling depends on the **Format** variant option.
+
+Example
+
+```apl
+ ⎕JSON'[1,-2,3]'
+1 ¯2 3
+```
+
+For details and more examples, see [Import to Data](#import-to-data) and [Import to Matrix](#import-to-matrix).
+
+## JSON Export
+
+When exporting, the APL data `Y` is converted to a corresponding JSON document `R`.
+
+`Y` is the data to be exported. By default, `Y` must be APL data that can be represented as JSON (subject to the [**HighRank**](#variant-option-highrank) variant option). If the [**Format**](#variant-option-format) variant option is set to `'M'`, `Y` must instead be a matrix representation such as would have been produced by importing JSON with **Format** being `'M'`. `⎕JSON` will signal `DOMAIN ERROR` if `Y` is incompatible with the specified (or implied) value of **Format**.
+
+`R` is a character vector whose content depends upon the values of the [**Compact**](#variant-option-compact), [**Dialect**](#variant-option-dialect), and [**Charset**](#variant-option-charset) variant options.
+
+`⎕JSON` output is not affected by [`⎕PP`](pp); numbers are always represented with full precision.
+
+Some JSON values lack a direct APL equivalent (true, false, null, JavaScript fragments), and some APL representations of datasets do not correspond to common JSON practice. Such cases are handled by [wrappers](#wrappers).
+
+Example
+
+```apl
+ ⎕JSON 1 ¯2 3
+[1,-2,3]
+```
+
+For details and more examples, see [Export from Data](#export-from-data) and [Export from Matrix](#export-from-matrix).
+
+## Name Mangling
+
+When `⎕JSON` converts a JSON document to APL data and a member of a JSON object has a name that is not a valid APL name, the member is renamed using a name mangling algorithm. This results in a name that begins with `⍙`. Any characters that cannot be part of an APL name are replaced with their [decimal Unicode code point](ucs-monadic.md) surrounded by `⍙`s.
+
+Example
+
+In this example, the JSON document describes an object containing two numeric items, one named `a` (which is a valid APL name) and the other named `2a` (which is not a valid APL name):
+```json
+{"a": 1, "2a": 2}
+```
+
+When the object is imported (as a namespace), `⎕JSON` renames `2a` to a valid APL name:
+```apl
+ (⎕JSON'{"a": 1, "2a": 2}').⎕NL 2
+a
+⍙2a
+```
+
+When the namespace is exported, `⎕JSON` reverses the mangling:
+```apl
+ ⎕JSON (a:1 ⋄ ⍙2a:2)
+{"a":1,"2a":2}
+```
+
+Example
+
+This object has a member name with a character (`ý`; `⎕UCS 253`) that is not allowed in APL names:
+```json
+{"sýn":"vision"}
+```
+The `ý` is replaced with `⍙253⍙` ("253" is the Unicode decimal character code for this character):
+```apl
+ (⎕JSON'{"sýn":"vision"}').⎕NL 2
+⍙s⍙253⍙n
+```
+
+### Name Mangling Algorithm
+
+[`7162⌶`](../primitive-operators/i-beam/json-translate-name.md) provides direct access to the name mangling algorithm.
+
+Example
+
+The above name translations are verified using `7162⌶`:
+```apl
+ 0(7162⌶)'2a' 'sýn'
+┌───┬────────┐
+│⍙2a│⍙s⍙253⍙n│
+└───┴────────┘
+ 1(7162⌶)'⍙2a' '⍙s⍙253⍙n'
+┌──┬───┐
+│2a│sýn│
+└──┴───┘
+```
+
+## Variant Options
+
+`⎕JSON` is controlled by six variant options. [](#variant-table) summarises each option's effect on import from JSON to APL (`X=0`) and export from APL to JSON (`X=1`). Each option is described in finer detail, with examples, below the table. Variant options specific to one direction are tolerated for the other direction even if they have no effect.
+
+Table: Variant options overview { #variant-table }
+
+| Variant Option | Value | Effect on Import | Effect on Export |
+|--------------------------------------------------------------------|:-------------------------------------:|-----------------------------------------------------|------------------|
+| [**Format**](#variant-option-format)
principal | `'D'`
default | `R` is APL data corresponding to `Y` | `Y` is APL data |
+|_- -_| `'M'` | `R` is an APL matrix encoding of `Y` | `Y` is a 4-column APL matrix as from import with `'M'` |
+| [**Dialect**](#variant-option-dialect) | `'JSON'`
default | Only strict JSON syntax is accepted | Only strict JSON syntax is produced |
+|_- -_| `'JSON5'` | [JSON5](https://json5.org/) extensions are accepted | JSON5 features are used to improve readability and editability, and/or shorten output |
+| [**Null**](#variant-option-null) | `⊂'null'`
default | JSON null becomes APL `⊂'null'` | APL `⊂'null'` becomes JSON null |
+|_- -_| `⎕NULL` | JSON null becomes APL `⎕NULL` | APL `⎕NULL` becomes JSON null |
+| [**Compact**](#variant-option-compact) | `1`
default | None | `R` has no whitespace outside quotes |
+|_- -_| `0` | None | `R` has whitespace for readability and, if **Dialect** is `'JSON5'`, trailing commas after final elements and members |
+| [**Charset**](#variant-option-charset) | `'Unicode'`
default | None | Unicode characters in `Y` are used when JSON standard allows |
+|_- -_| `'ASCII'` | None | Non-ASCII characters are converted to the hexadecimal form `\uNNNN`, and if **Dialect** is `'JSON5'`, also `\xNN` |
+| [**HighRank**](#variant-option-highrank) | `'Error'`
default | None | High-rank arrays are rejected |
+|_- -_| `'Split'` | None | High-rank arrays are split and [inverted table wrappers](#dataset-wrappers) accept text columns as matrices |
+
+### Variant Option: Format
+
+The **Format** variant option, the principal option, determines whether `⎕JSON` works with a direct APL representation of the data (`'D'` for "Data", the default) or with a four-column matrix that encodes the JSON structure (`'M'` for "Matrix") as nodes with depth, name, value, and type.
+
+#### Import to Data
+
+If **Format** is `'D'` (which stands for "Data", the default), the JSON document in `Y` is converted to the corresponding APL data `R`, possibly containing sub-arrays and/or sub-namespaces:
+
+- JSON arrays are converted into APL vectors.
+- JSON objects are converted into APL namespaces.
+- JSON null is converted into the specified (or implied) value of [**Null**](#variant-option-null) (`⊂'null'`, the default, or `⎕NULL`).
+- JSON true and false and, if the [**Dialect**](#variant-option-dialect) variant option is `'JSON5'`, the JSON5 numeric constants Infinity, -Infinity, and NaN, are converted to enclosed character vectors `⊂'true'`, `⊂'false'`, and so on.
+- If the JSON source contains object member names that are not valid APL names, they are converted to APL namespace members with [mangled names](#name-mangling). The original names can be obtained using [`7162⌶`](../primitive-operators/i-beam/json-translate-name.md).
+- If duplicate names are found, the last member encountered is used and all previous members with the same name are discarded.
+
+Examples
+
+The following JSON document is stored as the character vector `json`:
+```json
+{
+ "a": {
+ "b": [
+ "string 1",
+ "string 2"
+ ],
+ "c": true,
+ "d": {
+ "e": false,
+ "f⍺": [
+ "string 3",
+ 123,
+ 1000.2,
+ null
+ ]
+ }
+ }
+}
+```
+The JSON document is converted to APL data as a namespace:
+```apl
+ j←⎕JSON json
+ j
+#.[JSON object]
+```
+Listing the sub-namespace and its members:
+```apl
+ j.⎕NL 9
+a
+ j.a.⎕NL 2
+b
+c
+ j.a.b
+┌────────┬────────┐
+│string 1│string 2│
+└────────┴────────┘
+ j.a.c
+┌────┐
+│true│
+└────┘
+ j.a.⎕NL 9
+d
+```
+Note that `f⍺` is an invalid APL name:
+```apl
+ j.a.d.⎕NL 2
+e
+⍙f⍙9082⍙
+ j.a.d.⍙f⍙9082⍙
+┌────────┬───┬──────┬──────┐
+│string 3│123│1000.2│┌────┐│
+│ │ │ ││null││
+│ │ │ │└────┘│
+└────────┴───┴──────┴──────┘
+```
+The two ways to represent JSON nulls:
+```apl
+ (⎕JSON⍠'Null'⎕NULL)'[null,2,3]'
+ [Null] 2 3
+```
+
+#### Import to Matrix
+
+If **Format** is `'M'` (which stands for "Matrix"), the JSON document `Y` is converted to a corresponding APL matrix `R` whose columns are as follows:
+
+Table: Import matrix columns { #import-matrix-table }
+
+| Column | Contents |
+|---------|----------------------------------|
+| `R[;1]` | Depth |
+| `R[;2]` | Name (for JSON object members) |
+| `R[;3]` | APL value |
+| `R[;4]` | [JSON type](#import-types-table) |
+
+The JSON types are as follows:
+
+Table: JSON types { #import-types-table }
+
+| `R[;4]` | `R[;3]` (APL value) | Corresponding JSON value |
+|---------|----------------------------------------|--------------------------|
+| `1` | Empty (contents are in following rows) | Object |
+| `2` | Empty (contents are in following rows) | Array |
+| `3` | Number | Number |
+| `4` | Character vector | String |
+| `5` | Specified by **Null** variant | Null |
+| `6` | Enclosed character vector | Lacking APL equivalent |
+
+Note that:
+
+- JSON null is converted into the specified (or implied) value of [**Null**](#variant-option-null); `⊂'null'` (the default) or `⎕NULL`.
+- JSON values that lack an APL equivalent, true and false, and, if **Dialect** is `'JSON5'`, the JSON5 numeric constants Infinity, -Infinity, and NaN, are converted to enclosed character vectors `⊂'true'`, `⊂'false'`, and so on.
+- Object member names are reported as specified in the JSON text; they are not mangled as when **Format** is `'D'`.
+- If duplicate names are found, all duplicate members are recorded in the result matrix.
+
+Example
+This example uses the character vector `json` from the previous example:
+
+```apl
+ json
+{
+ "a": {
+ "b": [
+ "string 1",
+ "string 2"
+ ],
+ "c": true,
+ "d": {
+ "e": false,
+ "f⍺": [
+ "string 3",
+ 123,
+ 1000.2,
+ null
+ ]
+ }
+ }
+}
+ (⎕JSON⍠'M')json
+┌─┬──┬────────┬─┐
+│0│ │ │1│
+├─┼──┼────────┼─┤
+│1│a │ │1│
+├─┼──┼────────┼─┤
+│2│b │ │2│
+├─┼──┼────────┼─┤
+│3│ │string 1│4│
+├─┼──┼────────┼─┤
+│3│ │string 2│4│
+├─┼──┼────────┼─┤
+│2│c │┌────┐ │6│
+│ │ ││true│ │ │
+│ │ │└────┘ │ │
+├─┼──┼────────┼─┤
+│2│d │ │1│
+├─┼──┼────────┼─┤
+│3│e │┌─────┐ │6│
+│ │ ││false│ │ │
+│ │ │└─────┘ │ │
+├─┼──┼────────┼─┤
+│3│f⍺│ │2│
+├─┼──┼────────┼─┤
+│4│ │string 3│4│
+├─┼──┼────────┼─┤
+│4│ │123 │3│
+├─┼──┼────────┼─┤
+│4│ │1000.2 │3│
+├─┼──┼────────┼─┤
+│4│ │┌────┐ │5│
+│ │ ││null│ │ │
+│ │ │└────┘ │ │
+└─┴──┴────────┴─┘
+```
+
+#### Export from Data
+
+If **Format** is `'D'` (which stands for "Data"), the APL value `Y` is converted to a corresponding JSON document `R` as follows:
+
+- APL vectors are converted to JSON arrays.
+- APL arrays of higher rank are recursively split if [**HighRank**](#variant-option-highrank) is `'Split'`, otherwise `⎕JSON` will signal `DOMAIN ERROR`.
+- APL namespaces are converted to JSON objects.
+- Enclosed vectors whose leading element is a wrapper code are interpreted as [wrappers](#wrappers) (mechanisms for special handling).
+- If a namespace member name appears to be mangled (has a form that would have been produced by [name mangling](#name-mangling)), it is demangled.
+
+#### Export from Matrix
+
+If **Format** is `'M'` (which stands for "Matrix"), the APL array `Y` is converted to a corresponding JSON document `R` and `Y` must be a matrix whose columns are as follows:
+
+Table: Export matrix columns { #export-matrix-table }
+
+| Column | Contents |
+|---------|---------------------------------|
+| `Y[;1]` | Depth |
+| `Y[;2]` | Name (for JSON object members) |
+| `Y[;3]` | APL value |
+| `Y[;4]` | [JSON type](#export-types-table) |
+
+The JSON types are as follows:
+
+Table: JSON types { #export-types-table }
+
+| `Y[;4]` | `Y[;3]` (APL value) | Corresponding JSON value |
+|---------|---------------------------|--------------------------|
+| `1` | Empty array | Object |
+| `2` | Empty array | Array |
+| `3` | Numeric scalar | Number |
+| `4` | Character vector | String |
+| `5` | Null | Null |
+| `6` | Enclosed character vector | Lacking APL equivalent |
+| `7` | Enclosed character vector | [Raw text](#raw-text-wrapper) |
+
+The difference between JSON types `6` and `7` is that `7` allows any text but `6` only allows the special values that can be imported.
+
+If there are any mismatches between the values in `Y[;3]` and the types in `Y[;4]`, `⎕JSON` will signal `DOMAIN ERROR` and report the first row where there is a mismatch (`⎕IO` sensitive) as illustrated in the following example.
+
+Example
+
+```apl
+ m←(⎕JSON⍠'M')'{"values": [ 75, 300 ]}'
+ m
+┌─┬──────┬───┬─┐
+│0│ │ │1│
+├─┼──────┼───┼─┤
+│1│values│ │2│
+├─┼──────┼───┼─┤
+│2│ │75 │3│
+├─┼──────┼───┼─┤
+│2│ │300│3│
+└─┴──────┴───┴─┘
+```
+To illustrate type mismatches, the above matrix is modified by replacing one number with a character vector that looks the same:
+```apl
+ m[3;3]←⊂'75'
+ m
+┌─┬──────┬───┬─┐
+│0│ │ │1│
+├─┼──────┼───┼─┤
+│1│values│ │2│
+├─┼──────┼───┼─┤
+│2│ │75 │3│
+├─┼──────┼───┼─┤
+│2│ │300│3│
+└─┴──────┴───┴─┘
+ (⎕JSON⍠'M')m
+DOMAIN ERROR: JSON export: value does not match the specified type in row 3 (⎕IO=1)
+ (⎕JSON⍠'M')m
+ ∧
+```
+
+### Variant Option: Dialect
+
+If the **Dialect** variant option (default: `'JSON'`) is `'JSON5'`, [JSON5](https://json5.org/) extensions are enabled on import and export.
+
+On import, all JSON5 extensions are accepted.
+
+On export, the result is shortened by usage of identifiers without quotes, single quotes (`'`), and character escapes `\v` and of the form `\xNN` (for values less than hexadecimal 100, that is, `⎕UCS 256`). If [**Compact**](#variant-option-compact) is `0`, a trailing comma (`,`) is added after the last array element and object member.
+
+Examples
+
+```apl
+ (⎕JSON⍠'Dialect' 'JSON5')(a:'é"')
+{a:'é"'}
+
+ (⎕JSON⍠'Charset' 'ASCII'⍠'Compact' 0)(a:'é"')
+{
+ "a": "\u00E9\""
+}
+ (⎕JSON⍠'Charset' 'ASCII'⍠'Compact' 0⍠'Dialect' 'JSON5')(a:'é"')
+{
+ a: '\xE9"',
+}
+
+ (⎕JSON⍠'Dialect' 'JSON5')['["a\'
+ 'bc",'
+ '//:)'
+ '+.1,'
+ '/**/'
+ '0xf]']
+┌───┬───┬──┐
+│abc│0.1│15│
+└───┴───┴──┘
+```
+
+### Variant Option: Null
+
+The **Null** variant option selects how JSON null is represented in APL, and must be either `⊂'null'` (the default) or `⎕NULL`:
+
+- If **Null** is `⊂'null'`, `⎕NULL` causes `DOMAIN ERROR`.
+- If **Null** is `⎕NULL`, `⊂'null'` is still exported as null because it is interpreted as [raw text](#raw-text-wrapper).
+
+Examples
+
+```apl
+ (⎕JSON⍠'Null'⎕NULL)'[null,null]'
+ [Null] [Null]
+
+ (⎕JSON⍠'Null'⎕NULL)⎕NULL ⎕NULL
+[null,null]
+```
+
+### Variant Option: Compact
+
+The **Compact** variant option can be used to generate JSON that is either dense (`1`, the default) or optimised for humans to read and edit (`0`).
+
+If **Compact** is `0`:
+
+- Line breaks are inserted after opening brackets `[` and `{` and before closing brackets `]` and `}`
+- Each array element and object member is on its own line, indented with two spaces relative to its container array or object
+- A space is inserted after `:` separating member name and value
+- If [**Dialect**](#variant-option-dialect) is `'JSON5'`, a trailing comma (`,`) is added after the last array element and object member
+
+Example
+
+The following examples use this namespace as APL data:
+```apl
+ ns←(
+ a:(
+ b:(
+ 'charvec 1'
+ 'charvec 2'
+ )
+ c:⊂'true'
+ d:(
+ e:⊂'false'
+ ⍙f⍙9082⍙:(
+ 'charvec 3'
+ 123
+ 1000.2
+ ⊂'null'
+ )
+ )
+ )
+ )
+```
+Conversion to compact JSON:
+```apl
+ ⍴json←⎕JSON ns
+97
+ json
+{"a":{"b":["charvec 1","charvec 2"],"c":true,"d":{"e":false,"f⍺":["charvec 3",123,1000.2,null]}}}
+```
+Non-compact JSON takes more than twice as much space, but is more readable, and easier for humans to edit:
+```apl
+ ⍴json←(⎕JSON⍠'Compact' 0)ns
+208
+ (⎕JSON⍠'Compact' 0)ns
+{
+ "a": {
+ "b": [
+ "charvec 1",
+ "charvec 2"
+ ],
+ "c": true,
+ "d": {
+ "e": false,
+ "f⍺": [
+ "charvec 3",
+ 123,
+ 1000.2,
+ null
+ ]
+ }
+ }
+}
+```
+
+### Variant Option: Charset
+
+The **Charset** variant option can be used to either allow Unicode in the generated JSON (`'Unicode'`, the default) or restrict the output to ASCII characters (`'ASCII'`). When necessary, characters are converted to the hexadecimal form `\uNNNN`. If [**Dialect**](#variant-option-dialect) is `'JSON5'`, the form `\xNN` is used for values up to hexadecimal `FF` (`⎕UCS 255`).
+
+Example
+
+```apl
+ ns←(dé:'DÉ')
+ ns.dé
+DÉ
+ (⎕JSON⍠'Charset' 'ASCII')ns
+{"d\u00E9":"D\u00C9"}
+```
+
+### Variant Option: HighRank
+
+If **HighRank** is `'Error'` (the default), `⎕JSON` will signal a `DOMAIN ERROR` upon encountering any arrays in `Y` of rank higher than 1. If **HighRank** is `'Split'`, `⎕JSON` will recursively split any such arrays as necessary; in addition, [datasets](#dataset-wrappers) as inverted tables can have text columns represented as matrices.
+
+Example
+
+```apl
+ d←[[1 2 ⋄ 'AB']['ABC' ⋄ 'DEF']
+ (2 3⍴⍳6) (2 2 2⍴×⍨⍳8) ]
+ d
+┌─────┬─────┐
+│1 2 │ABC │
+│A B │DEF │
+├─────┼─────┤
+│1 2 3│ 1 4│
+│4 5 6│ 9 16│
+│ │ │
+│ │25 36│
+│ │49 64│
+└─────┴─────┘
+
+ (⎕JSON⍠'HighRank' 'Split')d
+[[[[1,2],"AB"],["ABC","DEF"]],[[[1,2,3],[4,5,6]],[[[1,4],[9,16]],[[25,36],[49,64]]]]]
+```
+
+## Wrappers
+
+A wrapper is an enclosed vector with the basic form `⊂wrapperCode wrapperData`. The `wrapperCode` can be omitted, and index vectors can be appended for data subsetting.
+
+Some APL representations of datasets do not correspond to common JSON practice for datasets. A wrapper provides special handling if such an APL representation is encountered inside a nested scalar; nested were selected for this purpose because they cannot be represented in JSON or JavaScript.
+
+A wrapper can be given directly as the right argument to `⎕JSON` or as part of the right argument's data structure (as a sub-array or in a sub-namespace). This allows a special array to be processed appropriately as part of a general data structure that is to be rendered as JSON.
+
+The structure of the special array is specified within the wrapper by a leading numeric code. Code `1` (the default) allows insertion of raw text, including JSON values such as null and true. Codes `2`, `3`, and `4` identify various representations of a *dataset*. The term *dataset* is used here to mean a collection of data, usually presented in tabular form. Each named column (also called a *field*) represents a particular variable. Each row (also called a *record*) corresponds to a given member of the dataset in question, listing its value for each of the variables, such as price and quantity of an item.
+
+In APL, a dataset is traditionally represented as a collection of variables:
+
+```apl
+ fields←'item' 'price' 'qty'
+ item←'Knife' 'Fork' 'Spoon'
+ price←3 4 5
+ qty←23 45 67
+```
+
+However, when a single array is needed, it is commonly represented as either a single mixed-type matrix that includes headers, a mixed-type matrix of values with a separate header vector, or an inverted table of values with a separate header vector.
+
+In JSON, a dataset is almost universally represented as an *array of objects* (JavaScript nomenclature for APL's *vector of namespaces*):
+
+```json
+[
+ {
+ "item": "Knife",
+ "price": 3,
+ "qty": 23
+ },
+ {
+ "item": "Fork",
+ "price": 4,
+ "qty": 45
+ },
+ {
+ "item": "Spoon",
+ "price": 5,
+ "qty": 67
+ }
+]
+```
+
+The JSON structure can be represented in APL as:
+
+```apl
+ ⎕←fields{()⎕VSET(↑⍺)⍵}⍤1⍉↑item price qty
+ #.[Namespace] #.[Namespace] #.[Namespace]
+```
+
+If such a representation is already used in an APL application, then no special handling is necessary to generate the corresponding JSON. However, transforming a dataset into a vector of namespaces, just for export to JSON, is cumbersome and can be expensive. `⎕JSON`'s wrapper codes `2`, `3`, and `4`, provide a quick and efficient way to transform the common APL representations of a dataset directly into a JSON array of objects.
+
+### Raw Text Wrapper
+
+Special JSON values such as null, true and false do not directly correspond to specific APL values and, therefore, require special handling. This is provided by wrapper code `1`:
+```apl
+ ⎕JSON 42 'text'(⊂1 'null')(⊂1 'true')(⊂1 'false')
+[42,"text",null,true,false]
+```
+
+As `1` is the default code number, it can be omitted:
+```apl
+ ⎕JSON 42 'text'(⊂'null')(⊂'true')(⊂'false')
+[42,"text",null,true,false]
+```
+
+This feature can be used to inject any raw text, although unless it is valid JSON it cannot then be re-imported.
+
+!!! Warning "Warning"
+ It is common practice to initialise a list using a scalar rather than a one-element vector. However, this will be interpreted as raw text if no subsequent elements are added:
+
+ It is, therefore, important to convert to a vector before initialising:
+
+
+Example
+
+This example illustrates how JavaScript objects can be exported; the object contains a JavaScript function that is specified by the contents of an enclosed character vector:
+```apl
+ slider←(
+ range:⊂'true'
+ min:0
+ max:500
+ values:75 300
+ slide:⊂'function(event,ui){$("#amount").val("$" + ui.values[0] + " - $" + ui.values[1]);}'
+ )
+ ⎕JSON slider
+{"max":500,"min":0,"range":true,"slide":function(event,ui){$("#amount").val("$" + ui.values[0] + " - $" + ui.values[1]);},"values":[75,300]}
+```
+
+### Dataset Wrappers
+
+Wrapper codes `2`, `3`, and `4` produce identical JSON output (an array of objects; the canonical JSON representation of a dataset), but each allows different APL representation of the dataset:
+
+Table: Wrapper codes { #wrapper-codes-table }
+
+| Code | Data | Advantage |
+|--------------|----------------------------------------------------------------------------------------|-----------|
+| `2` | Single mixed-type matrix (first row is header vector) | Preserves visual fidelity with a printed table |
+| `3` | Two-element nested vector: value matrix and header vector | Allows indexing into the rows and columns of the data |
+| `4` | Two-element nested vector: inverted table (vector of column vectors) and header vector | Less memory and faster lookups |
+
+For wrapper code `4`, if [**HighRank**](#variant-option-highrank) is `'Split'`, character columns can also be stored as character matrices rather than vectors of character vectors, providing even better performance, but `⎕JSON` will preserve trailing spaces.
+
+Examples
+
+The data arrays are defined as follows:
+
+```apl
+ ⎕←singleMatrix←fields⍪⍉↑item price qty
+┌─────┬─────┬───┐
+│item │price│qty│
+├─────┼─────┼───┤
+│Knife│3 │23 │
+├─────┼─────┼───┤
+│Fork │4 │45 │
+├─────┼─────┼───┤
+│Spoon│5 │67 │
+└─────┴─────┴───┘
+ ⎕←valueMatrix←⍉↑item price qty
+┌─────┬─┬──┐
+│Knife│3│23│
+├─────┼─┼──┤
+│Fork │4│45│
+├─────┼─┼──┤
+│Spoon│5│67│
+└─────┴─┴──┘
+ ⎕←invertedTable←item price qty
+┌──────────────────┬─────┬────────┐
+│┌─────┬────┬─────┐│3 4 5│23 45 67│
+││Knife│Fork│Spoon││ │ │
+│└─────┴────┴─────┘│ │ │
+└──────────────────┴─────┴────────┘
+ ⎕←invertedTable2←↑¨item price qty
+┌─────┬─────┬────────┐
+│Knife│3 4 5│23 45 67│
+│Fork │ │ │
+│Spoon│ │ │
+└─────┴─────┴────────┘
+ ⎕←header←fields
+┌────┬─────┬───┐
+│item│price│qty│
+└────┴─────┴───┘
+```
+
+All wrapper invocations produce the same array of objects (except for trailing spaces when using a character matrix to represent a text field):
+
+```apl
+ (⎕JSON⍠'HighRank' 'Split')⊂4(invertedTable2 header)
+[{"item":"Knife","price":3,"qty":23},{"item":"Fork ","price":4,"qty":45},{"item":"Spoon","price":5,"qty":67}]
+```
+
+Without their wrappers, each APL structure *can* be represented in JSON, though this is not a common way to represent a dataset:
+
+```apl
+ (⎕JSON⍠'HighRank' 'Split')singleMatrix
+[["item","price","qty"],["Knife",3,23],["Fork",4,45],["Spoon",5,67]]
+ (⎕JSON⍠'HighRank' 'Split')valueMatrix header
+[[["Knife",3,23],["Fork",4,45],["Spoon",5,67]],["item","price","qty"]]
+ (⎕JSON⍠'HighRank' 'Split')invertedTable2 header
+[[["Knife","Fork ","Spoon"],[3,4,5],[23,45,67]],["item","price","qty"]]
+```
+
+### Selection of a Subset
+
+A subset of a dataset's records (rows) and fields (columns) can be selected, with each subset being specified as a vector of strictly ascending indices and `⊂⍬` meaning "all" records (and/or fields):
+
+Table: Wrappers forms for selecting dataset subsets { #subset-table }
+
+| Subset | Wrapper form |
+|--------------------|--------------------------------------------|
+| records | `⊂wrapperCode wrapperData recordIndices` |
+| fields | `⊂wrapperCode wrapperData(⊂⍬)fieldIndices` |
+| records and fields | `⊂wrapperCode wrapperData recordIndices fieldIndices` |
+
+Examples
+
+To select the second record (Fork):
+```apl
+ ⎕JSON⊂4(invertedTable header)2
+[{"item":"Fork","price":4,"qty":45}]
+```
+
+To select the first and third fields (`item` and `qty`):
+```apl
+ ⎕JSON⊂4(invertedTable header)(⊂⍬)(1 3)
+[{"item":"Knife","qty":23},{"item":"Fork","qty":45},{"item":"Spoon","qty":67}]
+```
+
+To select the second record (Fork) and the first and third fields (`item` and `qty`):
+```apl
+ ⎕JSON⊂4(invertedTable header)2(1 3)
+[{"item":"Fork","qty":45}]
+```
+
+
+
+ ⎕JSON JSON
+
diff --git a/language-reference-guide/docs/system-functions/lock-disambiguation.md b/language-reference-guide/docs/system-functions/lock-disambiguation.md
new file mode 100644
index 00000000000..80330261661
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/lock-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Lock Definition `⎕LOCK`
+
+## Monadic `⎕LOCK` means
+
+[Lock Function](lock-monadic.md)
+
+## Dyadic `⎕LOCK` means
+
+[Custom Lock Function](lock-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/lock.md b/language-reference-guide/docs/system-functions/lock-dyadic.md
similarity index 83%
rename from language-reference-guide/docs/system-functions/lock.md
rename to language-reference-guide/docs/system-functions/lock-dyadic.md
index 36f10ae6f09..1ca2a0f4cc4 100644
--- a/language-reference-guide/docs/system-functions/lock.md
+++ b/language-reference-guide/docs/system-functions/lock-dyadic.md
@@ -3,13 +3,15 @@ search:
boost: 2
---
-# Lock Definition `{R}←{X}⎕LOCK Y`{{key}}
+# Custom Lock Function `{R}←X ⎕LOCK Y`{{key}}
`Y` must be a simple character scalar, or vector which is taken to be the name of a defined function or operator in the active workspace. `⎕LOCK` does not apply to dfns or derived functions.
+For the default degree of hiding, use [monadic `⎕LOCK`](lock-monadic.md).
+
The active referent to the name in the workspace is locked. Stop, trace and monitor settings, established by the `⎕STOP`, `⎕TRACE` and `⎕MONITOR` functions, are cancelled.
-The optional left argument `X` specifies to what extent the function code is hidden. `X` can be `0`, `1`, `2`, or `3` (the default) with the following meaning:
+The left argument `X` specifies to what extent the function code is hidden. `X` can be `0`, `1`, `2`, or `3` with the following meaning:
- `0`: The argument is well-formed, but could not be locked (for example, it is a dfn).
- `1`: The object may not be displayed and you may not obtain its character form using `⎕ATX`, `⎕CR`, `⎕NR`, or `⎕VR`.
@@ -37,7 +39,7 @@ A `DOMAIN ERROR` is reported if `Y` is ill-formed.
r←foo r←10
≢62 ⎕ATX'foo'
2
- ⎕LOCK'foo'
+ 3 ⎕LOCK'foo'
≢62 ⎕ATX'foo'
0
```
diff --git a/language-reference-guide/docs/system-functions/lock-monadic.md b/language-reference-guide/docs/system-functions/lock-monadic.md
new file mode 100644
index 00000000000..816cf45db3c
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/lock-monadic.md
@@ -0,0 +1,33 @@
+---
+search:
+ boost: 2
+---
+
+# Lock Function `{R}←⎕LOCK Y`{{key}}
+
+`Y` must be a simple character scalar, or vector which is taken to be the name of a defined function or operator in the active workspace. `⎕LOCK` does not apply to dfns or derived functions.
+
+The active referent to the name in the workspace is locked. Stop, trace and monitor settings, established by the `⎕STOP`, `⎕TRACE` and `⎕MONITOR` functions, are cancelled.
+
+The function code is hidden and suspension within it is prevented.
+
+The shy result `R` is the [lock state](lock-dyadic.md) (`1`, `2`, or `3`) of `Y`.
+
+A `DOMAIN ERROR` is reported if `Y` is ill-formed.
+
+Examples
+```apl
+ ⎕FX'r←foo' 'r←10'
+ 62 ⎕ATX'foo'
+ r←foo r←10
+ ≢62 ⎕ATX'foo'
+2
+ ⎕LOCK'foo'
+ ≢62 ⎕ATX'foo'
+0
+```
+
+
+
+ ⎕LOCK LOCK
+
diff --git a/language-reference-guide/docs/system-functions/map-disambiguation.md b/language-reference-guide/docs/system-functions/map-disambiguation.md
new file mode 100644
index 00000000000..d672b36865a
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/map-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Map File `⎕MAP`
+
+## Monadic `⎕MAP` means
+
+[Map Array File](map-monadic.md)
+
+## Dyadic `⎕MAP` means
+
+[Map Raw Data File](map-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/map.md b/language-reference-guide/docs/system-functions/map-dyadic.md
similarity index 60%
rename from language-reference-guide/docs/system-functions/map.md
rename to language-reference-guide/docs/system-functions/map-dyadic.md
index db8d555d4a8..c3c7f363c42 100644
--- a/language-reference-guide/docs/system-functions/map.md
+++ b/language-reference-guide/docs/system-functions/map-dyadic.md
@@ -3,15 +3,13 @@ search:
boost: 2
---
-# Map File `R←{X}⎕MAP Y`{{key}}
+# Map Raw Data File `R←X ⎕MAP Y`{{key}}
`⎕MAP` function associates a mapped file with an APL array in the workspace.
-Two types of mapped files are supported; *APL* and *raw*. An *APL* mapped file contains the binary representation of a Dyalog APL array, including its header. A file of this type must be created using the utility function `∆MPUT` (supplied in the `util` workspace). When you map an APL file, the rank, shape and data type of the array is obtained from the information on the file.
+To map a file that already holds an APL array, use [monadic `⎕MAP`](map-monadic.md).
-A *raw* mapped file is an arbitrary collection of bytes. When you map a raw file, you must specify the characteristics of the APL array to be associated with this data. In particular, the data type and its shape.
-
-The type of mapping is determined by the presence (raw) or absence (APL) of the left argument to `⎕MAP`.
+A raw mapped file is an arbitrary collection of raw data bytes. When you map a raw file, you must specify the characteristics of the APL array to be associated with this data. In particular, the data type and its shape.
The right argument `Y` specifies the name of the file to be mapped and, optionally, the access type and a start byte in the file. `Y` may be a simple character vector, or a 2 or 3-element nested vector containing:
@@ -21,7 +19,7 @@ The right argument `Y` specifies the name of the file to be mapped and, optional
If you map a file with read-only access you may modify the corresponding array in the workspace, however your changes are not written back to the file.
-If `X` is specified, it defines the type and shape to be associated with *raw* data on file. `X` must be an integer scalar or vector. The first item of `X` specifies the data type and must be one of the following values:
+`X` defines the type and shape to be associated with raw data on file. `X` must be an integer scalar or vector. The first item of `X` specifies the data type and must be one of the following values:
|---------------|-------------------------------------|
|Classic Edition|11, 82, 83, 163, 323 or 645 |
@@ -31,9 +29,7 @@ The values are more fully explained in [Data Representation (Monadic)](data-repr
Following items determine the shape of the mapped array. A value of `¯1` on any (but normally the first) axis in the shape is replaced by the system to mean: read as many complete records from the file as possible. Only one axis may be specified in this way. Note that if `X` is a singleton, the data on the file is mapped as a scalar and only the first value on the file is accessible.
-If no left argument is given, file is assumed to contain a simple APL array, complete with header information (type, rank, shape, etc.). Such mapped files may only be updated by changing the associated array using indexed/pick assignment: `var[a]←b`, the new values must be of the same type as the originals.
-
-Note that a *raw* mapped file may be updated *only* if its *file offset* is 0. Note also that Windows does not support mapped files of zero length.
+Note that a raw mapped file may be updated *only* if its *file offset* is 0. Note also that Windows does not support mapped files of zero length.
Examples
@@ -57,16 +53,6 @@ Map bytes 100-160 in raw file as a `5×2` read-only matrix of doubles:
dat←645 5 2 ⎕MAP'c:\myfile' 'R' 80
```
-Put simple 4-byte integer array on disk ready for mapping:
-```apl
- (⊃83 323 ⎕DR 2 3 4⍴⍳24)∆MPUT'c:\myvar'
-```
-
-Then, map a read-write variable:
-```apl
- var←⎕MAP'c:\myvar' 'w'
-```
-
Note that a mapped array need not be *named*. In the following example, a 'raw' file is mapped, summed and released, all in a single expression:
```apl
+/163 ¯1 ⎕MAP'c:\shorts.dat'
@@ -81,8 +67,6 @@ If you fail to specify the shape of the data, the data on file will be mapped as
## Compatibility between Editions
-In the Unicode Edition `⎕MAP` will fail with a `TRANSLATION ERROR` (event number 92) if you attempt to map an APL file which contains character data type 82.
-
In order for the Unicode Edition to correctly interpret data in a raw file that was written using data type 82, the file may be mapped with data type 83 and the characters extracted by indexing into `⎕AVU`.
diff --git a/language-reference-guide/docs/system-functions/map-monadic.md b/language-reference-guide/docs/system-functions/map-monadic.md
new file mode 100644
index 00000000000..02f42c5c1b2
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/map-monadic.md
@@ -0,0 +1,50 @@
+---
+search:
+ boost: 2
+---
+
+# Map Array File `R←⎕MAP Y`{{key}}
+
+`⎕MAP` function associates a mapped file with an APL array in the workspace.
+
+To map a file of raw data by giving its type and shape, use [dyadic `⎕MAP`](map-dyadic.md).
+
+An APL mapped file contains the binary representation of a simple Dyalog APL array, including its header. A file of this type must be created using the utility function `∆MPUT` (supplied in the `util` workspace). When you map an APL file, the rank, shape and data type of the array is obtained from the information on the file.
+
+The right argument `Y` specifies the name of the file to be mapped and, optionally, the access type and a start byte in the file. `Y` may be a simple character vector, or a 2 or 3-element nested vector containing:
+
+1. file name (character scalar/vector)
+2. access code (character scalar/vector) : one of : `'R'` or `'r'` (read-only access), `'W'` or `'w'` (read-write access). If not specified, the file is mapped read-only.
+3. start byte offset (integer scalar/vector). This is only applicable for read-only access and is not supported for read-write access. It must be a multiple of the word size (4 on 32-bit systems, 8 on 64-bit systems). The default is 0.
+
+If you map a file with read-only access you may modify the corresponding array in the workspace, however your changes are not written back to the file.
+
+The file contains a simple APL array, complete with header information (type, rank, shape, etc.). Such mapped files may only be updated by changing the associated array using indexed/pick assignment: `var[a]←b`, the new values must be of the same type as the originals.
+
+Examples
+
+First, copy the `∆MPUT` utility from the `util` workspace:
+```apl
+ '∆MPUT' ⎕CY 'util'
+```
+
+Put simple 4-byte integer array on disk ready for mapping:
+```apl
+ (⊃83 323 ⎕DR 2 3 4⍴⍳24)∆MPUT'c:\myvar'
+```
+
+Then, map a read-write variable:
+```apl
+ var←⎕MAP'c:\myvar' 'w'
+```
+
+Note that a mapped array need not be *named*.
+
+## Compatibility between Editions
+
+In the Unicode Edition `⎕MAP` will fail with a `TRANSLATION ERROR` (event number 92) if you attempt to map an APL file which contains character data type 82.
+
+
+
+ ⎕MAP MAP
+
diff --git a/language-reference-guide/docs/system-functions/mkdir-disambiguation.md b/language-reference-guide/docs/system-functions/mkdir-disambiguation.md
new file mode 100644
index 00000000000..54f89c24e4d
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/mkdir-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Make Directory `⎕MKDIR`
+
+## Monadic `⎕MKDIR` means
+
+[Create Directory](mkdir-monadic.md)
+
+## Dyadic `⎕MKDIR` means
+
+[Custom Create Directory](mkdir-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/mkdir-dyadic.md b/language-reference-guide/docs/system-functions/mkdir-dyadic.md
new file mode 100644
index 00000000000..7607d1e99d5
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/mkdir-dyadic.md
@@ -0,0 +1,47 @@
+---
+search:
+ boost: 2
+---
+
+# Custom Create Directory `{R}←X ⎕MKDIR Y`{{key}}
+
+This function creates new directories.
+
+`Y` is a character vector or scalar containing a single directory name, or a vector of character vectors containing zero or more directory names. Names must conform to the naming rules of the host Operating System.
+
+By default, for each name in `Y` the path must exist and the base name must not exist (see [Native File Exists](nexists.md)), otherwise an error is signalled. The left argument `X` and the variant option **Unique** can be used to amend this behaviour.
+
+The left argument `X` is a numeric scalar that modifies the default behaviour when the base name in `Y` already exists and/or the path in `Y` does not already exist. The default value is `0`, which is equivalent to [monadic `⎕MKDIR`](mkdir-monadic.md). Possible values and the effect that they have on the default behaviour are:
+
+|---|---|
+| `0` | The base name in `Y` must not exist and the path in `Y` must exist, otherwise an error is signalled. |
+|`1`|No action is taken if a directory specified by `Y` already exists (the return value indicates whether a new directory was created). Has no effect when the variant option **Unique** is set.|
+|`2`|Any part of the *paths* specified in `Y` which does not already exist will be created in preparation of creating the corresponding directory. |
+|`3`|Combination of 1 and 2. |
+
+The **Unique** option specifies whether the base name (see [File Name Parts](nparts-monadic.md)) in `Y` is modified so that the name is unique (does not already exist). The shy result `R` depends on the value of **Unique**:
+
+| Unique | Effect on Behaviour | `R` when `Y` is Single Name | `R` when `Y` is Vector of Names |
+|--------|---------------------|-----------------------------|---------------------------------|
+| `0` (default) | The directory named in `Y` will be created. | a scalar `1` if a directory was created or `0` if not | a vector of `1`s and `0`s with the same length as `Y` |
+| `1` | The name in `Y` is modified by extending the base name with random characters and the directory is created. The name of the directory is returned in the result `R`. | a character vector containing the name of the directory that was created | a vector of character vectors with the same length as `Y` |
+
+If a directory cannot be created (for example, if a directory with that name already exists, or write access is denied) then an error is signalled.
+
+Examples
+
+```apl
+ ⎕NEXISTS '/Users/Pete/Documents/temp'
+0
+
+ ⎕←2 ⎕MKDIR'/Users/Pete/Documents/temp/t1/t2'
+1
+```
+
+!!! note
+ When multiple names are specified they are processed in the order given. If an error occurs at any point whilst creating directories, processing will immediately stop and an error will be signalled. The operation is not atomic; some directories may be created before this happens. In the event of an error there will be no result and therefore no indication of how many directories were created before the error occurred.
+
+
+
+ ⎕MKDIR MKDIR
+
diff --git a/language-reference-guide/docs/system-functions/mkdir-monadic.md b/language-reference-guide/docs/system-functions/mkdir-monadic.md
new file mode 100644
index 00000000000..c69f45685c5
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/mkdir-monadic.md
@@ -0,0 +1,48 @@
+---
+search:
+ boost: 2
+---
+
+# Create Directory `{R}←⎕MKDIR Y`{{key}}
+
+This function creates new directories.
+
+`Y` is a character vector or scalar containing a single directory name, or a vector of character vectors containing zero or more directory names. Names must conform to the naming rules of the host Operating System.
+
+For each name in `Y` the path must exist and the base name must not exist (see [Native File Exists](nexists.md)), otherwise an error is signalled. Use the variant option **Unique** or [dyadic `⎕MKDIR`](mkdir-dyadic.md) to handle these cases.
+
+The **Unique** option specifies whether the base name (see [File Name Parts](nparts-monadic.md)) in `Y` is modified so that the name is unique (does not already exist). The shy result `R` depends on the value of **Unique**:
+
+| Unique | Effect on Behaviour | `R` when `Y` is Single Name | `R` when `Y` is Vector of Names |
+|--------|---------------------|-----------------------------|---------------------------------|
+| `0` (default) | The directory named in `Y` will be created. | a scalar `1` if a directory was created or `0` if not | a vector of `1`s and `0`s with the same length as `Y` |
+| `1` | The name in `Y` is modified by extending the base name with random characters and the directory is created. The name of the directory is returned in the result `R`. | a character vector containing the name of the directory that was created | a vector of character vectors with the same length as `Y` |
+
+If a directory cannot be created (for example, if a directory with that name already exists, or write access is denied) then an error is signalled.
+
+Examples
+
+```apl
+ ⎕NEXISTS '/Users/Pete/Documents/temp'
+0
+ ⎕←⎕MKDIR '/Users/Pete/Documents/temp'
+1
+ ⎕←⎕MKDIR '/Users/Pete/Documents/temp'
+FILE NAME ERROR: /Users/Pete/Documents/temp: Already exists
+ ⎕←⎕MKDIR'/Users/Pete/Documents/temp'
+ ∧
+
+ ⎕←(⎕MKDIR⍠'Unique'1)'/Users/Pete/Documents/temp'
+/Users/Pete/Documents/tempdjM0X8
+
+ ⊢⎕MKDIR'temp1' 'temp2'
+1 1
+```
+
+!!! note
+ When multiple names are specified they are processed in the order given. If an error occurs at any point whilst creating directories, processing will immediately stop and an error will be signalled. The operation is not atomic; some directories may be created before this happens. In the event of an error there will be no result and therefore no indication of how many directories were created before the error occurred.
+
+
+
+ ⎕MKDIR MKDIR
+
diff --git a/language-reference-guide/docs/system-functions/mkdir.md b/language-reference-guide/docs/system-functions/mkdir.md
deleted file mode 100644
index fbf13e76b5f..00000000000
--- a/language-reference-guide/docs/system-functions/mkdir.md
+++ /dev/null
@@ -1,81 +0,0 @@
----
-search:
- boost: 2
----
-
-# Make Directory `{R}←{X}⎕MKDIR Y`{{key}}
-
-This function creates new directories.
-
-`Y` is a character vector or scalar containing a single directory name, or a vector of character vectors containing zero or more directory names. Names must conform to the naming rules of the host Operating System.
-
-By default, for each name in `Y` the path must exist and the base name must not exist (see [File Name Parts](nparts.md)), otherwise an error is signalled. The optional left argument `X` and the variant option **Unique** can be used to amend this behaviour.
-
-The result `R` depends on the value of the variant option **Unique**. If **Unique** is not present, it is assumed to have a value of `0`.
-
-| Unique | Result `R` |
-|--------|------------|
-|` 0` | If `Y` specifies a single name, the shy result `R` is a scalar `1` if a directory was created or `0` if not. If `Y` is a vector of character vectors, `R` is a vector of `1`s and `0`s with the same length as `Y`. |
-| `1` | If `Y` specifies a single name, the shy result `R` is a character vector containing the name of the directory that was created. If `Y` is a vector of character vectors, `R` is a vector of character vectors with the same length as `Y`. |
-
-The optional left argument `X` is a numeric scalar that modifies the default behaviour when the base name in `Y` already exists and/or the path in `Y` does not already exist. If omitted, it is assumed to be 0. Possible values and the effect that they have on the default behaviour are:
-
-|---|---|
-| `0` {.shaded} | The base name in `Y` must not exist and the path in `Y` must exist, otherwise an error is signalled. |
-|`1`|No action is taken if a directory specified by `Y` already exists (the return value indicates whether a new directory was created). Has no effect when the variant option **Unique** is set.|
-|`2`|Any part of the *paths* specified in `Y` which does not already exist will be created in preparation of creating the corresponding directory. |
-|`3`|Combination of 1 and 2. |
-
-## Variant Options
-
-`⎕MKDIR` may be applied using the variant operator with the option **Unique**. There is no primary option.
-
-## Unique Option (Boolean)
-The **Unique** option specifies whether the base name (see [File Name Parts](nparts.md)) in `Y` is modified so that the name is unique (does not already exist).
-
-| Unique | Effect on Behaviour |
-|-------------------|----------------------|
-|` 0` { .shaded } | The directory named in `Y` will be created. |
-| `1` | The name in `Y` is modified by extending the base name with random characters and the directory is created. The name of the directory is returned in the result `R`. |
-
-If a directory cannot be created (for example, if a directory with that name already exists, or write access is denied) then an error is signalled.
-
-Examples
-```apl
-
- ⎕NEXISTS '/Users/Pete/Documents/temp'
-0
- ⎕←⎕MKDIR '/Users/Pete/Documents/temp'
-1
- ⎕←⎕MKDIR '/Users/Pete/Documents/temp'
-FILE NAME ERROR: Directory exists
- ⎕←⎕MKDIR'/Users/Pete/Documents/temp'
- ∧
-
- ⎕←⎕MKDIR'/Users/Pete/Documents/temp/t1/t2'
-FILE NAME ERROR: Unable to create directory ("The system cannot find the path specified.")
- ⎕←⎕MKDIR'/Users/Pete/Documents/temp/t1/t2'
- ∧
-
- ⎕←2 ⎕MKDIR'/Users/Pete/Documents/temp/t1/t2'
-1
-
- ⎕←⎕MKDIR'/Users/Pete/Documents/temp/t1/t2'
-FILE NAME ERROR: /Users/Pete/Documents/temp/t1/t2: Already exists
- ⎕←⎕MKDIR'/Users/Pete/Documents/temp/t1/t2'
- ∧
-
- ⎕←(⎕MKDIR⍠'Unique'1)'/Users/Pete/Documents/temp/t1/t2'
-/Users/Pete/Documents/temp/t1/t2djM0X8
-
- ⊢⎕MKDIR'temp1' 'temp2'
-1 1
-```
-
-!!! note
- When multiple names are specified they are processed in the order given. If an error occurs at any point whilst creating directories, processing will immediately stop and an error will be signalled. The operation is not atomic; some directories may be created before this happens. In the event of an error there will be no result and therefore no indication of how many directories were created before the error occurred.
-
-
-
- ⎕MKDIR MKDIR
-
diff --git a/language-reference-guide/docs/system-functions/na-disambiguation.md b/language-reference-guide/docs/system-functions/na-disambiguation.md
new file mode 100644
index 00000000000..65dd157e6f2
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/na-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Name Association `⎕NA`
+
+## Monadic `⎕NA` means
+
+[Associate External Function with Own Name](na-monadic.md)
+
+## Dyadic `⎕NA` means
+
+[Associate External Function with Custom Name](na-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/na-dyadic.md b/language-reference-guide/docs/system-functions/na-dyadic.md
new file mode 100644
index 00000000000..2f18b0e4d12
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/na-dyadic.md
@@ -0,0 +1,895 @@
+---
+search:
+ boost: 2
+---
+
+# Associate External Function with Custom Name `{R}←X ⎕NA Y`{{key}}
+
+`⎕NA` provides access from APL to compiled functions within a library. A library is implemented according to the Operating System as follows:
+
+- a Dynamic Link Library(**.dll**) under Windows
+- a Shared Library (**.so** or **.dylib**) under Linux or macOS
+- a static library (**.a**) under AIX
+
+A library, referred to here generically as a a Dynamic Link Library (DLL), is a collection of functions typically written in C (or C++) each of which may take arguments and return a result.
+
+Instructional examples using `⎕NA` can be found in the supplied workspace `quadna`.
+
+The DLL may be part of the standard operating system software, a library purchased from a third party supplier, or one that you have written yourself.
+
+The right argument `Y` is a character vector that identifies the name and syntax of the function to be associated. The left argument `X` is a character vector that contains the name on the APL side to be associated with the external function. You can use [monadic `⎕NA`](na-monadic.md) if the APL name matches the external function's name. If the `⎕NA` is successful, a function (name class 3) is established in the active workspace with name `X`.
+
+The shy result `R` is a character vector containing the name of the external function that was fixed.
+
+For example, `math.dll` might be a library of mathematical functions containing a function `divide`.
+
+In a compiled language such as C, the types of arguments and results of functions must be declared explicitly. Typically, these types will be published with the documentation that accompanies the DLL. For example, function `divide` might be declared:
+```c
+double divide(int32_t, int32_t);
+```
+
+which means that it expects two long (4-byte) integer arguments and returns a double (8-byte) floating point result. Notice the correspondence between the C declaration and the right argument of `⎕NA`:
+
+
+| C |
+
+```c
+ double divide (int32_t, int32_t);
+```
+
+ |
+| APL |
+
+```apl
+'div' ⎕NA 'F8 math|divide I4 I4'
+```
+
+ |
+
+
+So to associate the APL name `div` with this external function:
+```apl
+ 'div' ⎕NA 'F8 math|divide I4 I4'
+```
+
+where `F8` and `I4`, specify the types of the result and arguments expected by `divide`. The association has the effect of establishing a new function: `div` in the workspace, which when called, passes its arguments to `divide` and returns the result.
+```apl
+ )FNS
+div
+ div 10 4
+2.5
+```
+
+It is imperative that care be taken when coding type declarations. A DLL *cannot* check types of data passed from APL. A wrong type declaration will lead to erroneous results or may even cause the workspace to become corrupted and crash. During development, you may wish to prevent this happening. See [ErrorOnExternalException](../../../windows-installation-and-configuration-guide/configuration-parameters/configuration-parameters).
+
+The full syntax for the right argument of `⎕NA` is:
+```
+ [result] library|function [arg1] [arg2] ...
+```
+
+Note that functions associated with DLLs are never dyadic. All arguments are passed as items of a (possibly nested) vector on the right of the function.
+
+## Locating the DLL
+
+The DLL may be specified using a full pathname, file extension, and function type.
+
+### Be aware
+
+A 32-bit interpreter can only load 32-bit DLLs/shared libraries; a 64-bit interpreter can only load 64-bit DLLs/shared libraries.
+
+If a DLL/shared library has a missing dependency, the error generated by the operating system, and therefore reported by Dyalog will suggest that the DLL/shared library that was explicitly called in the `⎕NA` call is missing.
+
+### Pathname
+
+APL uses the `LoadLibrary()` system function under Windows or `dlopen()` under UNIX, Linux and macOS to load the DLL. If a full or relative pathname is omitted, these functions search a list of directories determined by the operating system. This list always includes the directory which contains the Dyalog program, and on all non-Windows platforms, $DYALOG/lib. For further details, see the operating system documentation about these functions.
+
+Alternatively, a full or relative pathname may be supplied in the usual way:
+```apl
+ 'bar'⎕NA'... c:\mydir\mydll|foo ...'
+```
+
+### Errors
+
+If the specified DLL (or a dependent DLL) fails to load it will generate:
+```
+FILE ERROR 2 No such file or directory
+```
+
+It is frequently the case that this error is a result of a missing dependency; operating systems do not return error codes which allow the interpreter to generate a more specific error.
+
+If the DLL loads successfully, but the specified library function is not accessible, it will generate:
+```apl
+VALUE ERROR
+```
+
+### File Extension
+
+Under Windows, if the file extension is omitted, **.dll** is assumed. Note that some DLLs are in fact **.exe** files, and in this case the extension must be specified explicitly:
+```apl
+ 'bar'⎕NA'... mydll.exe|foo ...'
+```
+
+### libc.a on Non-Windows Platforms
+
+On non-Windows platforms many of the most useful system library functions appear in `libc.a`. The `quadna` workspace includes the function `NonWindows.Setup` which has code which will locate `libc.a` on each platform.
+
+## Data Type Coding Scheme
+
+The type coding scheme introduced above is of the form:
+
+```
+[direction] [special] type [width] [array][[count]]
+```
+
+The options are summarised in the following table and their functions detailed below.
+
+|Description|Symbol |Meaning |
+|-----------|--------|-------------------------------------------------------------------------------------------------------|
+|Direction |`<` |Pointer to array *input* to DLL function. |
+| |`>` |Pointer to array *output* from DLL |
+|_ _|`=` |Pointer to input/output |
+|Special |`0` |Null-terminated string. |
+|_ _|`#` |Byte-counted string |
+|Type |`I` |int |
+| |`U` |unsigned int |
+| |`C` |char |
+| |`T` |char (Classic Edition: translated to/from ANSI) |
+| |`F` |float |
+| |`D` |decimal |
+| |`J` |complex |
+| |`P` |uintptr-t (equivalent to U4 and U8 on 32-bit and 64-bit widths respectively) |
+| |`A` |APL array |
+|_ _|`Z` |APL array with header (as passed to a TCP/IP socket) |
+|Width |`1` |1-byte |
+| |`2` |2-byte |
+| |`4` |4-byte |
+| |`8` |8-byte |
+|_ _|`16` |16-byte (128-bit) |
+|Array |`[n]` |Array of length *n* elements |
+|_ _|`[]` |Array, length determined at call-time |
+|Structure |`{...}` |Structure. |
+|Count |`[int]` |Rather than explicitly declaring multiple adjacent occurrences of the same the count option may be used|
+
+In the Classic Edition, `C` specifies untranslated character, whereas `T` specifies that the character data will be translated to/from `⎕AV`.
+
+In the Unicode Edition, C and T are identical (no translation of character data is performed) except that for C the default width is 1 and for T the default width is "wide" (2 bytes under Windows, 4 bytes under UNIX, Linux or macOS).
+
+The use of T with default width is recommended to ensure portability between Editions.
+
+### Direction
+
+C functions accept data arguments either by *value* or by *address*. This distinction is indicated by the presence of a '`*`' or '`[]`' in the argument declaration:
+```c
+int num1; // value of num1 passed.
+int *num2; // Address of num2 passed.
+int num3[]; // Address of num3 passed.
+```
+
+An argument (or result) of an external function of type pointer, must be matched in the `⎕NA` call by a declaration starting with one of the characters: `<`, `>`, or `=`.
+
+In C, when an address is passed, the corresponding value can be used as either an *input* or an *output* variable. An output variable means that the C function overwrites values at the supplied address. Because APL is a call-by-value language, and doesn't have pointer types, we accommodate this mechanism by distinguishing output variables, and having them returned explicitly as part of the result of the call.
+
+This means that where the C function indicates a *pointer type*, we must code this as starting with one of the characters: `<`, `>` or `=`.
+
+|---|---|
+|`<`|indicates that the address of the argument will be used by C as an input variable and values at the address will *not* be over-written.|
+|`>`|indicates that C will use the address as an output variable. In this case, APL must allocate an output array over which C can write values. After the call, this array will be included in the nested result of the call to the external function.|
+|`=`|indicates that C will use the address for both input and output. In this case, APL duplicates the argument array into an output buffer whose address is passed to the external function. As in the case of an output only array, the newly modified copy will be included in the nested result of the call to the external function.|
+
+Examples
+
+|-----|-----------------------------------------------------------|
+|`C` |Pointer to character *output* from external function. |
+|`=T` |Pointer to character *input* to and *output* from function.|
+|`=A` |Pointer to APL array *modified* by function. |
+
+### Special
+
+In C it is common to represent character strings as *null-terminated* or *byte counted* arrays. These special data types are indicated by inserting the symbol `0` (null-terminated) or `#` (byte counted) between the direction indicator (`<`, `>`, `=`) and the type (`T` or `C)` specification. For example, a pointer to a null-terminated input character string is coded as `<0T[]`, and an output one coded as `>0T[]`.
+
+Note that while appending the array specifier '`[]`' is formally correct, because the presence of the special qualifier (`0` or `#`) *implies* an array, the '`[]`' may be omitted: `<0T`, `>0T`, `=#C`, etc.
+
+Note also that the 0 and # specifiers may be used with data of all types (excluding `A` and `Z`) and widths. For example, in the Classic Edition, `<0U2` may be useful for dealing with Unicode.
+
+### Type
+
+The data type of the argument may be one of the following characters and may be specified in lower or upper case:
+
+|Code|Type|Description|
+|---|---|---|
+|`I`|Integer|The value is interpreted as a 2s complement signed integer|
+|`U`|Unsigned integer|The value is interpreted as an unsigned integer|
+|`C`|Character|The value is interpreted as a character. In the Unicode Edition, the value maps directly onto a Unicode code point. In the Classic Edition, the value is interpreted as an index into `⎕AV` . This means that `⎕AV` *positions* map onto corresponding ANSI *positions* . For example, with `⎕IO=0` : `⎕AV[35] = 's'` , maps to `ANSI[35] = '`|
+|`T`|Translated character|The value is interpreted as a character. In the Unicode Edition, the value maps directly onto a Unicode code point. In the Classic Edition, the value is *translated* using standard Dyalog `⎕AV` to ANSI translation. This means that `⎕AV` *characters* map onto corresponding ANSI *characters* . For example, with `⎕IO=0` : `⎕AV[35] = 's'` maps to `ANSI[115] = 's'`|
+|`UTF`|Unicode encoded|`>0UTF8[]` will translate to a UTF-8 encoded string `<0UTF16[]` will translate from a UTF-16LE encoded string|
+|`F`|Float|The value is interpreted as an IEEE 754-2008 binary64 floating point number|
+|`D`|Decimal|The value is interpreted as an IEEE 754-2008 decimal128 floating point number (DPD format on AIX, BID format on other platforms)|
+|`J`|Complex| |
+|`P`|uintptr-t|This is equivalent to U4 on 32-bit versions and U8 on 64-bit versions|
+|`∇`|Function pointer|This allows the passing of an APL function for the function to call|
+|`A`|APL array|This is the same format as is used to transmit APL arrays to an Auxiliary Processor (AP)|
+|`Z`|APL array with header|This is the same format as is used to transmit APL arrays over TCP/IP Sockets|
+
+### Width
+
+The type specifier may be followed by the width of the value in bytes. For example:
+
+|-----|-------------------------------------|
+|`I4` |4-byte signed integer. |
+|`U2` |2-byte unsigned integer. |
+|`F8` |8-byte floating point number. |
+|`F4` |4-byte floating point number. |
+|`D16`|16-byte decimal floating-point number|
+
+|Type |Possible values for Width|Default value for Width |
+|-----|-------------------------|-------------------------|
+|`I` |1, 2, 4, 8 |4 |
+|`U` |1, 2, 4, 8 |4 |
+|`C` |1,2,4 |1 |
+|`T` |1,2,4 |wide character(see below)|
+|`UTF`|8,16 |none |
+|`F` |4, 8 |8 |
+|`D` |16 |16 |
+|`J` |16 |16 |
+|`P` |Not applicable | |
+|`∇` |Not applicable | |
+|`A` |Not applicable | |
+|`Z` |Not applicable | |
+
+In the Unicode Edition, the default width is the width of a *wide character* according to the convention of the host operating system. This translates to T2 under Windows and T4 under UNIX, Linux or macOS.
+
+Note that 32-bit versions can support 64-bit integer *arguments*, but not 64-bit integer *results*.
+
+Examples
+
+|-----|-----------------------------------------------------|
+|`I2` |16-bit integer |
+|`I8[3]` rather than `>I8 >I8 >I8`
+
+`{I8 U8 I8 P}[2]` rather than `{I8 U8 I8 P} {I8 U8 I8 P}`
+
+## Using a Function
+
+A DLL function may or may not return a result, and may take zero or more arguments. This syntax is reflected in the coding of the right argument of `⎕NA`. However, notice that the corresponding associated APL function is a result-returning niladic (if it takes no arguments) or monadic function. It cannot be dyadic and it must *always* return a vector result - a null one if there is no output from the DLL function. See Result Vector section below. Examples of the various combinations are:
+
+### DLL function Non-result-returning
+```apl
+'myfn1' ⎕NA 'mydll|fn1' ⍝ Niladic
+'myfn2' ⎕NA 'mydll|fn2 <0T' ⍝ Monadic - 1-element arg
+'myfn3' ⎕NA 'mydll|fn3 =0T <0T' ⍝ Monadic - 2-element arg
+```
+
+### DLL function Result-returning
+```apl
+'myfn4' ⎕NA 'I4 mydll|fn4' ⍝ Niladic
+'myfn5' ⎕NA 'I4 mydll|fn5 F8' ⍝ Monadic - 1-element arg
+'myfn6' ⎕NA 'I4 mydll|fn6 >I4[] <0T'⍝ Monadic - 2-element arg
+```
+
+When the external function is called, the number of elements in the argument must match the number defined in the `⎕NA` definition. Using the examples above:
+```apl
+ myfn1 ⍝ Niladic Function.
+ myfn2, ⊂'Single String' ⍝ 1-element arg
+ myfn3 'This' 'That' ⍝ 2-element arg
+```
+
+Note in the second example, that you must enclose the argument string to produce a single item (nested) array in order to match the declaration. Dyalog converts the type of a numeric argument if necessary, so for example in `myfn5` defined above, a Boolean value would be converted to double floating point (F8) prior to being passed to the DLL function.
+
+### Multi-Threading
+
+Appending the '`&`' character to the function name causes the external function to be run in its own system thread. For example:
+```apl
+ 'bar' ⎕NA'... mydll|foo& ...'
+```
+
+This means that other APL threads can run concurrently with the one that is calling the `⎕NA` function.
+
+### Name Mangling
+
+C++ and some other languages will by default mangle (or decorate) function names which are exported from a DLL file. The given external function name must exactly match the exported name, either by matching the name mangling or by ensuring the names exported from the library are not mangled.
+
+### Call by Ordinal Number
+
+Under Windows, a DLL may associate an *ordinal number* with any of its functions. This number may then be used to call the function as an alternative to calling it by name. Using `⎕NA` to call by ordinal number uses the same syntax but with the function name replaced with its ordinal number. For example:
+```apl
+ 'fn57'⎕NA'... mydll|57 ...'
+```
+
+### Pointer Arguments
+
+When passing pointer arguments there are three cases to consider.
+
+### `<` Input pointer
+
+In this case you must supply the data array itself as argument to the function. A pointer to its first element is then passed to the DLL function.
+```apl
+ fn2 ⊂'hello'
+```
+
+### `>` Output pointer
+
+Here, you must supply the **number of elements** that the output will need in order for APL to allocate memory to accommodate the resulting array.
+```apl
+ fn6 10 'world' ⍝ 1st arg needs space for 10 ints.
+```
+
+Note that if you were to reserve fewer elements than the DLL function actually used, the DLL function would write beyond the end of the reserved array and may cause the interpreter to crash with a System Error (syserror 999 on Windows or SIGSEGV on UNIX, Linux or macOS).
+
+### `=` Input/Output
+
+As with the input-only case, a pointer to the first element of the argument is passed to the DLL function. The DLL function then overwrites some or all of the elements of the array, and the new value is passed back as part of the result of the call. As with the output pointer case, if the input array were too short, so that the DLL wrote beyond the end of the array, the interpreter would almost certainly crash.
+```apl
+ fn3 '.....' 'hello'
+```
+
+### Specifying Pointers Explicitly
+
+`⎕NA` syntax enables APL to pass arguments to DLL functions by *value* or *address* as appropriate. For example if a function requires an integer followed by a *pointer* to an integer:
+```c
+void fun(int value, int *addr);
+```
+
+You might declare and call it:
+```apl
+ 'myfun'⎕NA'mydll|fun I I4[] <0T`|`1`|`1 0`|`2`|
+
+Note that the result vector from a function that is declared `void()` and has no output parameters is `⍬` (zilde).
+
+As a convenience, if the result would otherwise be a 1-item vector, it is disclosed. Using the third example above:
+```apl
+ ⍴myfn3 '.....' 'abc'
+5
+```
+
+`myfn3` has no explicit result; its first argument is input/output pointer; and its second argument is input pointer. Therefore as the length of the result would be 1, it has been disclosed.
+
+### 64 bit integer results
+
+When a 64 bit integer result is returned it is converted into 128 bit decimal floating point, because this is the only APL data type that can fully preserve all 64 bits of the result. If you wish to perform arithmetic with this value, you must set `⎕FR` to 1287 in order to preserve the same precision. If this is not done then the precision will be 53 bits which might not be enough.
+
+### Callbacks (`∇`)
+
+Currently, support for a `⎕NA` function to call an APL function is limited to the use of the NAG (National Algorithms Group) library of functions. This library is a FORTRAN library and FORTRAN passes arguments by reference (address) rather than by value. The expression:
+```apl
+ ∇f8←(P P P P)
+```
+
+declares a callback function that returns a double and takes 4 pointer arguments. The result can be any of the normal results. It is not possible to return a pointer. The arguments can be from 0 to 16 P values.
+
+The argument when passed can be the name of an APL function or the `⎕OR` of a function.
+
+The function when called can then decode the pointer arguments appropriately using a `⎕NA` of `MEMCPY()`.
+
+### ANSI /Unicode Versions of Library Calls
+
+Under Windows, most library functions that take character arguments, or return character results have two forms: one Unicode (Wide) and one ANSI. For example, a function such as `MessageBox()`, has two forms `MessageBoxA()` and `MessageBoxW()`. The `A` stands for ANSI (1-byte) characters, and the `W` for wide (2-byte Unicode) characters.
+
+It is essential that you associate the form of the library function that is appropriate for the Dyalog Edition you are using, that is, `MessageBoxA()` for the Classic Edition, but `MessageBoxW()` for the Unicode Edition.
+
+Whilst this is convenient it is not complete. It is adequate for character arrays that consist of characters from UCS-2 (that is, those that will fit in an array with a `⎕DR` of 80 or 160). If a more complete support is required then the W form of the function would be required and explicit use of UTF16 specified.
+
+To simplify writing portable code for both Editions, you may specify the character `*` instead of `A` or `W` at the end of a function name. This will be replaced by `A` in the Classic Edition and `W` in the Unicode Edition.
+
+The default name of the associated function (if no left argument is given to `⎕NA`), will be without the trailing letter (`MessageBox`).
+
+### Type Definitions
+
+The C language encourages the assignment of defined names to primitive and complex data types using its `#define` and `typedef` mechanisms. Using such abstractions enables the C programmer to write code that will be portable across many operating systems and hardware platforms.
+
+Windows software uses many such names and Microsoft documentation will normally refer to the type of function arguments using defined names such as `HANDLE` or `LPSTR` rather than their equivalent C primitive types: `int` or `char*`.
+
+It is beyond the scope of this manual to list *all* the Microsoft definitions and their C primitive equivalents, and indeed, DLLs from sources other than Microsoft may well employ their own distinct naming conventions.
+
+In general, you should consult the documentation that accompanies the DLL in order to convert typedefs to primitive C types and thence to `⎕NA` declarations. The documentation may well refer you to the 'include' files which are part of the Software Development Kit, and in which the types are defined.
+
+The following table of some commonly encountered Windows typedefs and their `⎕NA` equivalents might prove useful.
+
+|Windows typedef|`⎕NA` equivalent|
+|---------------|----------------|
+|HWND |`P` |
+|HANDLE |`P` |
+|GLOBALHANDLE |`P` |
+|LOCALHANDLE |`P` |
+|DWORD |`U4` |
+|WORD |`U2` |
+|BYTE |`U1` |
+|LPSTR |`=0T[] (note 1)`|
+|LPCSTR |`<0T[] (note 2)`|
+|WPARAM |`U (note 3)` |
+|LPARAM |`U4 (note 3)` |
+|LRESULT |`I4` |
+|BOOL |`I` |
+|UINT |`U` |
+|ULONG |`U4` |
+|ATOM |`U2` |
+|HDC |`P` |
+|HBITMAP |`P` |
+|HBRUSH |`P` |
+|HFONT |`P` |
+|HICON |`P` |
+|HMENU |`P` |
+|HPALETTE |`P` |
+|HMETAFILE |`P` |
+|HMODULE |`P` |
+|HINSTANCE |`P` |
+|COLORREF |`{U1[4]}` |
+|POINT |`{I I}` |
+|POINTS |`{I2 I2}` |
+|RECT |`{I I I I}` |
+|CHAR |`T or C` |
+
+### Notes
+
+1. `LPSTR` is a pointer to a null-terminated string. The definition does not indicate whether this is input or output, so the safest coding would be `=0T[]` (providing the vector you supply for input is long enough to accommodate the result). You may be able to improve simplicity or performance if the documentation indicates that the pointer is 'input only' (<`0T[]`) or 'output only' (>`0T[]`). See Direction above.
+2. `LPCSTR` is a pointer to a *constant* null-terminated string and therefore coding `<0T[]` is safe.
+3. `WPARAM` is an unsigned value, `LPARAM` is signed.
+They are 32 bit values in a 32-bit APL, and 64-bit in a 64 bit APL.
+You should consult the documentation for the specific function that you intend to call to determine what type they represent
+
+4. The use of type T with default width ensures portability of code between Classic and Unicode Editions. In the Classic Edition, T (with no width specifier) implies 1-byte characters which are translated between `⎕AV` and ASCII, while in the Unicode Edition, T (with no width specifier) implies 2-byte (Unicode) characters.
+
+## The Dyalog DLL
+
+The Dyalog DLL (see [Run-Time Applications and Components](../../../windows-installation-and-configuration-guide/runtime-applications-and-components)) contains three functions: `MEMCPY`, `STRNCPY` and `STRLEN`.
+
+### MEMCPY
+
+`MEMCPY` is an extremely versatile function used for moving arbitrary data between memory buffers.
+
+Its C definition is:
+```c
+void *MEMCPY( // copy memory
+ void *to, // target address
+ void *fm, // source address
+ size_t size // number of bytes to copy
+);
+```
+
+`MEMCPY` copies `size` bytes starting from source address `fm`, to destination address `to`. The source and destination areas should not overlap; if they do the behaviour is undefined and the result is the first argument.
+
+`MEMCPY`'s versatility stems from being able to associate to it using many different type declarations.
+
+Example
+
+Suppose a global buffer (at address: `addr`) contains (`numb`) double floating point numbers. To copy these to an APL array, we could define the association:
+```apl
+ 'doubles' ⎕NA 'dyalog32|MEMCPY >F8[] I4 U4'
+ doubles numb addr (numb×8)
+```
+
+Notice that:
+
+- As the first argument to `doubles` is an output argument, we must supply the number of elements to reserve for the output data.
+- `MEMCPY` is defined to take the number of *bytes* to copy, so we must multiply the number of elements by the element size in bytes.
+
+Example
+
+Suppose that a database application requires that we construct a record in global memory prior to writing it to file. The record structure might look like this:
+```c
+typedef struct {
+ int empno; // employee number.
+ float salary; // salary.
+ char name[20]; // name.
+} person;
+```
+
+Then, having previously allocated memory (`addr`) to receive the record, we can define:
+```apl
+ 'prec' ⎕NA 'dyalog64|MEMCPY P <{P F4 T[20]} P'
+ prec addr(99 12345.60 'Charlie Brown')(4+4+20)
+```
+
+### STRNCPY
+
+`STRNCPY` is used to copy null-terminated strings between memory buffers.
+
+Its C definition is:
+```c
+void *STRNCPY( // copy null-terminated string
+ char *to, // target address
+ char *fm, // source address
+ size_t size // MAX number of chars to copy
+);
+```
+
+`STRNCPY` copies a maximum of `size` characters from the null-terminated source string at address `fm`, to the destination address `to`. If the source and destination strings overlap, the result is the first argument.
+
+If the source string is shorter than `size`, a null character is appended to the destination string.
+
+If the source string (including its terminating null) is longer than `size`, only `size` characters are copied and the resulting destination string is not null-terminated
+
+Example
+
+Suppose that a database application returns a pointer (`addr`) to a structure that contains two (max 20-char) null-terminated strings.
+```c
+typedef struct { // null-terminated strings:
+ char first[20]; // first name (max 19 chars + 1 null).
+ char last[20]; // last name. (max 19 chars + 1 null).
+} name;
+```
+
+To copy the names *from* the structure:
+```apl
+ 'get'⎕NA'dyalog64|STRNCPY >0T1[] P U4'
+ get 20 addr 20
+Charlie
+ get 20 (addr+20) 20
+Brown
+```
+
+Note that (as this is a 64-bit example), `⎕FR` must be 1287 for the addition to be reliable.
+
+To copy data *from* the workspace *into* an already allocated (`new`) structure:
+```apl
+ 'put'⎕NA'dyalog32|STRNCPY I4 <0T[] U4'
+ put new 'Bo' 20
+ put (new+4) 'Peep' 20
+```
+
+Notice in this example that you must ensure that names no longer than 19 characters are passed to `put`. More than 19 characters would not leave `STRNCPY` enough space to include the trailing null, which would probably cause the application to fail.
+
+### STRNCPYA
+
+This is a synonym for `STRNCPY`. It is there so that `STRNCPY*` (on Microsoft Windows) selects between `STRNCPYA` and `STRNCPYW`.
+
+### STRNCPYW
+
+This is a cover for the C standard function `wcsncpy()`. It is named this way so that (on Microsoft Windows) `STRNCPY*` will behave helpfully.
+
+### STRLEN
+
+`STRLEN` calculates the length of a C string (a 0-terminated string of bytes in memory). Its C declaration is:
+```c
+size_t STRLEN( // calculate length of string
+ const char *s // address of string
+);
+```
+Example
+
+Suppose that a database application returns a pointer (`addr`) to a null-terminated string and you do not know the upper bound on the length of the string.
+
+To copy the string into the workspace:
+```apl
+ 'len'⎕NA'P dyalog32|STRLEN P'
+ 'cpy'⎕NA'dyalog32|MEMCPY >T[] P P'
+ cpy l addr (l←len addr)
+Bartholemew
+```
+
+## Examples
+
+The following examples all use functions from the Microsoft Windows `user32.dll`.
+
+This DLL should be located in a standard Windows directory, so you should not normally need to give the full path name of the library. However if trying these examples results in the error message `FILE ERROR 1 No such file or directory`, you must locate the DLL and supply the full path name (and possibly extension).
+
+### GetCaretBlinkTime()
+
+The Windows function `GetCaretBlinkTime` retrieves the caret blink rate. It takes no arguments and returns an unsigned *int* and is declared as follows:
+
+```c
+UINT GetCaretBlinkTime(void);
+```
+
+The following statement provides access to this routine through an APL function called `BLINK`.
+```apl
+ 'BLINK' ⎕NA 'U user32|GetCaretBlinkTime'
+ BLINK
+530
+```
+
+### SetCaretBlinkTime()
+
+The Microsoft Windows function `SetCaretBlinkTime` sets the caret blink rate. It takes a single unsigned `int` argument, does not return a result and is declared as follows:
+
+```c
+void SetCaretBlinkTime(UINT);
+```
+
+The following statements would provide access to this routine through an APL function called `SETBLINK`:
+```apl
+ 'SETBLINK' ⎕NA 'user32|SetCaretBlinkTime U'
+ SETBLINK 1000
+```
+
+### MessageBox()
+
+The Microsoft Windows function `MessageBox` displays a standard dialog box on the screen and awaits a response from the user. It takes 4 arguments. The first is the window handle for the window that owns the message box. This is declared as an unsigned *int*. The second and third arguments are both pointers to null-terminated strings containing the message to be displayed in the Message Box and the caption to be used in the window title bar. The 4th argument is an unsigned *int* that specifies the Message Box type. The result is an *int* which indicates which of the buttons in the message box the user has pressed. The function is declared as follows:
+
+```c
+int MessageBox(HWND, LPCSTR, LPCSTR, UINT);
+```
+The following statement provides access to this routine through an APL function called `MB`. Note that the 2nd and 3rd arguments are both coded as input pointers to type T null-terminated character arrays which ensures portability between Editions.
+```apl
+ 'MB' ⎕NA 'I user32|MessageBox* P <0T <0T U'
+```
+
+The following statement displays a Message Box with a stop sign icon together with 2 push buttons labelled OK and Cancel (this is specified by the value 19).
+```apl
+ MB 0 'Message' 'Title' 19
+```
+
+The function works equally well in the Unicode Edition because the `<0T` specification is portable.
+```apl
+ MB 0 'Το Μήνυμα' 'Ο Τίτλος' 19
+```
+
+Note that a simpler, portable (and safer) method for displaying a Message Box is to use Dyalog APL's primitive `MsgBox` object.
+
+### FindWindow()
+
+The Microsoft Windows function `FindWindow` obtains the window handle of a window which has a given character string in its title bar. The function takes two arguments. The first is a pointer to a null-terminated character string that specifies the window's class name. However, if you are not interested in the class name, this argument should be a NULL pointer. The second is a pointer to a character string that specifies the title that identifies the window in question. This is an example of a case described above where two instances of the function must be defined to cater for the two different types of argument. However, in practice this function is most often used without specifying the class name. The function is declared as follows:
+
+```c
+HWND FindWindow(LPCSTR, LPCSTR);
+```
+
+The following statement associates the APL function `FW` with the second variant of the FindWindow call, where the class name is specified as a NULL pointer. To indicate that APL is to pass the *value* of the NULL pointer, rather than its address, we need to code this argument as `P`.
+
+```apl
+ 'FW' ⎕NA 'P user32|FindWindow* P <0T'
+```
+
+To obtain the handle of the window entitled "CLEAR WS - Dyalog APL/W":
+```apl
+ ⎕←HNDL←FW 0 'CLEAR WS - Dyalog APL/W'
+59245156
+```
+
+### GetWindowText()
+
+The Microsoft Windows function `GetWindowText` retrieves the caption displayed in a window's title bar. It takes 3 arguments. The first is an unsigned *int* containing the window handle. The second is a pointer to a buffer to receive the caption as a null-terminated character string. This is an example of an output array. The third argument is an *int* which specifies the maximum number of characters to be copied into the output buffer. The function returns an *int* containing the actual number of characters copied into the buffer and is declared as follows:
+
+```c
+int GetWindowText(HWND, LPSTR, int);
+```
+
+The following associates the "`GetWindowText`" DLL function with an APL function `GWT`. Note that the second argument is coded as "`>0T`" indicating that it is a pointer to a character output array.
+```apl
+ 'GWT' ⎕NA 'I user32|GetWindowText* P >0T I'
+```
+
+Now change the Session caption using `)WSID` :
+```apl
+ )WSID MYWS
+was CLEAR WS
+```
+
+Then retrieve the new caption (max length 255) using window handle `HNDL` from the previous example:
+```apl
+ ]Display GWT HNDL 255 255
+┌→─────────────────────────┐
+│ ┌→──────────────────┐ │
+│ 19 │MYWS - Dyalog APL/W│ │
+│ └───────────────────┘ │
+└∊─────────────────────────┘
+```
+
+There are three points to note.
+
+1. Firstly, the number 255 is supplied as the second argument. This instructs APL to allocate a buffer large enough for a 255-element character vector into which the DLL routine will write.
+2. Secondly, the result of the APL function is a nested vector of 2 elements. The first element is the result of the DLL function. The second element is the output character array.
+3. Finally, notice that although we reserved space for 255 elements, the result reflects the length of the actual text (19).
+
+An alternative way of coding and using this function is to treat the second argument as an input/output array.
+
+In this case, the second argument is coded as `=0T`, so when the function is called an array of the appropriate size must be supplied. This method uses more space in the workspace, although for small arrays (as in this case) the real impact of doing so is negligible.
+
+### GetCharWidth()
+
+The function `GetCharWidth` returns the width of each character in a given range. Its first argument is a device context (handle). Its second and third arguments specify font positions (start and end). The third argument is the resulting integer vector that contains the character widths (this is an example of an output array). The function returns a Boolean value to indicate success or failure. The function is defined as follows. Note that this function is provided in the library: `gdi32.dll`.
+
+```c
+BOOL GetCharWidth(HDC, UINT, UINT, LPINT);
+```
+
+The following statements provide access to this routine through an APL function called `GCW`:
+```apl
+ 'GCW' ⎕NA 'U4 gdi32|GetCharWidth* P U U >I[]'
+
+ 'Prin'⎕WC'Printer'
+
+ ]Display GCW ('Prin' ⎕WG 'Handle') 65 67 3
+┌→─────────────┐
+│ ┌→───────┐ │
+│ 1 │50 50 50│ │
+│ └~───────┘ │
+└∊─────────────┘
+```
+
+Note: `'Prin'⎕WG'Handle'` returns a handle which is represented as a number. The number will be in the range (0 - 2*32] on a 32-bit version and (0 - 2*64] on a 64-bit version. These can be passed to a P type parameter. Older versions used a 32-bit signed integer.
+
+### The `quadna` workspace
+
+The following example from the supplied workspace: quadna.dws. `quadna` illustrates several techniques which are important in advanced `⎕NA` programming. Function `DllVersion` returns the major and minor version number for a given DLL. Note that this example assumes that the computer is running the 64-bit version of Dyalog.
+
+In advanced DLL programming, it is often necessary to administer memory outside APL's workspace. In general, the procedure for such use is:
+
+1. Allocate global memory.
+2. Lock the memory.
+3. Copy any DLL input information from workspace into memory.
+4. Call the DLL function.
+5. Copy any DLL output information from memory to workspace.
+6. Unlock the memory.
+7. Free the memory.
+
+Notice that steps 1 and 7 and steps 2 and 6 complement each other. That is, if you allocate global system memory, you must free it after you have finished using it. If you continue to use global memory without freeing it, your system will gradually run out of resources. Similarly, if you lock memory (which you must do before using it), then you should unlock it before freeing it. Although on some versions of Windows, freeing the memory will include unlocking it, in the interests of good style, maintaining the symmetry is probably a good thing.
+
+```apl
+ ∇ version←DllVersion file;Aloc;Free;Lock;Ulok;Size;Info;Valu;copy;size;hndl;addr;buff;ok;retn
+[1]
+[2] 'Aloc'⎕NA'P kernel32|GlobalAlloc U4 P'
+[3] 'Free'⎕NA'P kernel32|GlobalFree P'
+[4] 'Lock'⎕NA'P kernel32|GlobalLock P'
+[5] 'Ulok'⎕NA'U4 kernel32|GlobalUnlock P'
+[6]
+[7]
+[8] 'Size'⎕NA'U4 version|GetFileVersionInfoSize* <0T >U4'
+[9] 'Info'⎕NA'U4 version|GetFileVersionInfo* <0T U4 U4 P'
+[10] 'Valu'⎕NA'U4 version|VerQueryValue* P <0T >U4 >U4'
+[11]
+[12] 'copy'⎕NA'P msvcrt|memcpy >U4[] P U4'
+[13]
+[14] :If ×size←⊃Size file 0 ⍝ Size of info.
+[15] :AndIf ×hndl←Aloc 0 size ⍝ Alloc memory.
+[16] :If ×addr←Lock hndl ⍝ Lock memory.
+[17] :If ×Info file 0 size addr ⍝ Version info.
+[18] (ok buff size)←Valu addr'\' 0 0 ⍝ Version value.
+[19] :If ok
+[20] retn buff←copy(size÷4)buff size ⍝ Copy info.
+[21] version←(2/2*16)⊤⊃2↓buff ⍝ Encode version.
+[22] :EndIf
+[23] :EndIf
+[24] ok←Ulok hndl ⍝ Unlock memory.
+[25] :EndIf
+[26] ok←Free hndl ⍝ Free memory.
+[27] :EndIf
+ ∇
+```
+
+Lines [2-10] associate APL function names with the DLL functions that will be used.
+
+Lines [2-5] associate functions to administer global memory.
+
+Lines [8-10] associate functions to extract version information from a DLL.
+
+Line [12] associates `copy` with `memcpy`.
+
+Lines [14-27] call the DLL functions.
+
+Line [15] requests the size of buffer required to receive version information for the DLL. A size of 0 will be returned if the DLL does not contain version information.
+
+**Notice that** care is taken to balance memory allocation and release:
+
+On line [15], the `:If` clause is taken only if the global memory allocation is successful, in which case (and only then) a corresponding `Free` is called on line [26].
+
+`Ulok` on line [24] is called if and only if the call to `Lock` on line [16] succeeds.
+
+A result is returned from the function *only* if all the calls are successful Otherwise, the calling environment will sustain a `VALUE ERROR`.
+
+
+
+ ⎕NA NA
+
diff --git a/language-reference-guide/docs/system-functions/na.md b/language-reference-guide/docs/system-functions/na-monadic.md
similarity index 84%
rename from language-reference-guide/docs/system-functions/na.md
rename to language-reference-guide/docs/system-functions/na-monadic.md
index 35c98ef9362..5f755fb3b00 100644
--- a/language-reference-guide/docs/system-functions/na.md
+++ b/language-reference-guide/docs/system-functions/na-monadic.md
@@ -3,7 +3,7 @@ search:
boost: 2
---
-# Name Association `{R}←{X}⎕NA Y`{{key}}
+# Associate External Function with Own Name `{R}←⎕NA Y`{{key}}
`⎕NA` provides access from APL to compiled functions within a library. A library is implemented according to the Operating System as follows:
@@ -17,7 +17,7 @@ Instructional examples using `⎕NA` can be found in the supplied workspace `qua
The DLL may be part of the standard operating system software, a library purchased from a third party supplier, or one that you have written yourself.
-The right argument `Y` is a character vector that identifies the name and syntax of the function to be associated. The left argument `X` is a character vector that contains the name to be associated with the external function. If the `⎕NA` is successful, a function (name class 3) is established in the active workspace with name `X`. If `X` is omitted, the name of the external function itself is used for the association.
+The right argument `Y` is a character vector that identifies the name and syntax of the function to be associated. The name of the external function itself is also used on the APL side for the association. Use [dyadic `⎕NA`](na-dyadic.md) to associate a custom name instead. If the `⎕NA` is successful, a function (name class 3) is established in the active workspace under the name of the external function itself.
The shy result `R` is a character vector containing the name of the external function that was fixed.
@@ -25,25 +25,38 @@ For example, `math.dll` might be a library of mathematical functions containing
In a compiled language such as C, the types of arguments and results of functions must be declared explicitly. Typically, these types will be published with the documentation that accompanies the DLL. For example, function `divide` might be declared:
```c
- double divide(int32_t, int32_t);
+double divide(int32_t, int32_t);
```
which means that it expects two long (4-byte) integer arguments and returns a double (8-byte) floating point result. Notice the correspondence between the C declaration and the right argument of `⎕NA`:
+
+
+| C |
+
+```c
+ double divide (int32_t, int32_t);
```
- C: double divide (int32_t, int32_t);
- APL: 'div' ⎕NA 'F8 math|divide I4 I4 '
+
+ |
+| APL |
+
+```apl
+⎕NA 'F8 math|divide I4 I4'
```
-So to associate the APL name `div` with this external function:
+ |
+
+
+So to associate the APL name `divide` with this external function:
```apl
- 'div' ⎕NA 'F8 math|divide I4 I4'
+ ⎕NA 'F8 math|divide I4 I4'
```
-where `F8` and `I4`, specify the types of the result and arguments expected by `divide`. The association has the effect of establishing a new function: `div` in the workspace, which when called, passes its arguments to `divide` and returns the result.
+where `F8` and `I4`, specify the types of the result and arguments expected by `divide`. The association has the effect of establishing a new function: `divide` in the workspace, which when called, passes its arguments to the C `divide` and returns the result.
```apl
)FNS
-div
- div 10 4
+divide
+ divide 10 4
2.5
```
@@ -252,17 +265,13 @@ could be coded as:
Confusion sometimes arises over a difference in the declaration syntax between C and `⎕NA`. In C, an argument declaration may be given to receive a pointer to either a single scalar item, or to the first element of an array. This is because in C, the address of an array is deemed to be the address of its first element.
```c
- void foo (char *string);
- char ch = 'a', ptr = "abc";
- foo(&ch);// call with address of scalar.
- foo(ptr);// call with address of array.
+void foo (char *string);
+char ch = 'a', ptr = "abc";
+foo(&ch);// call with address of scalar.
+foo(ptr);// call with address of array.
```
-However, from APL's point of view, these two cases are distinct and if the function is to be called with the address of (pointer to) a *scalar*, it must be declared: `'I8[3]` rather than `>I8 >I8 >I8`
`{I8 U8 I8 P}[2]` rather than `{I8 U8 I8 P} {I8 U8 I8 P}`
@@ -369,10 +376,7 @@ C++ and some other languages will by default mangle (or decorate) function names
### Call by Ordinal Number
-Under Windows, a DLL may associate an *ordinal number* with any of its functions. This number may then be used to call the function as an alternative to calling it by name. Using `⎕NA` to call by ordinal number uses the same syntax but with the function name replaced with its ordinal number. For example:
-```apl
- ⎕NA'... mydll|57 ...'
-```
+Under Windows, a DLL may associate an *ordinal number* with any of its functions. This number may then be used to call the function as an alternative to calling it by name. Using `⎕NA` to call by ordinal number uses the same syntax but with the function name replaced with its ordinal number. To use such functions, supply a [custom name](na-dyadic.md).
### Pointer Arguments
@@ -382,14 +386,14 @@ When passing pointer arguments there are three cases to consider.
In this case you must supply the data array itself as argument to the function. A pointer to its first element is then passed to the DLL function.
```apl
- fn2 ⊂'hello'
+ myfn2 ⊂'hello'
```
### `>` Output pointer
Here, you must supply the **number of elements** that the output will need in order for APL to allocate memory to accommodate the resulting array.
```apl
- fn6 10 'world' ⍝ 1st arg needs space for 10 ints.
+ myfn6 10 'world' ⍝ 1st arg needs space for 10 ints.
```
Note that if you were to reserve fewer elements than the DLL function actually used, the DLL function would write beyond the end of the reserved array and may cause the interpreter to crash with a System Error (syserror 999 on Windows or SIGSEGV on UNIX, Linux or macOS).
@@ -398,7 +402,7 @@ Note that if you were to reserve fewer elements than the DLL function actually u
As with the input-only case, a pointer to the first element of the argument is passed to the DLL function. The DLL function then overwrites some or all of the elements of the array, and the new value is passed back as part of the result of the call. As with the output pointer case, if the input array were too short, so that the DLL wrote beyond the end of the array, the interpreter would almost certainly crash.
```apl
- fn3 '.....' 'hello'
+ myfn3 '.....' 'hello'
```
### Specifying Pointers Explicitly
@@ -419,14 +423,7 @@ Two common cases occur where it is necessary to pass a pointer explicitly. The f
In both cases, the pointer argument should be coded as `P`. This causes APL to pass the pointer unchanged, *by value*, to the DLL function.
-In the previous example, to pass a null pointer, (or one returned from another DLL function), you must code a separate `⎕NA` definition.
-```apl
- 'fun_null'⎕NA'mydll|fun I P' ⋄ fun_null 42 0
-```
-
-Now APL passes the *value* of the second argument (in this case 0 - the null pointer), rather than its address.
-
-Note that by using P, which is 4-byte for 32-bit processes and 8-byte for 64-bit processes, you will ensure that the code will run unchanged under both 32-bit and 64-bit versions of Dyalog APL.
+In the previous example, to pass a null pointer, (or one returned from another DLL function), you must code a separate [`⎕NA` definition with a custom name](na-dyadic.md).
### Result Vector
@@ -565,13 +562,13 @@ void *MEMCPY( // copy memory
Suppose a global buffer (at address: `addr`) contains (`numb`) double floating point numbers. To copy these to an APL array, we could define the association:
```apl
- 'doubles' ⎕NA 'dyalog32|MEMCPY >F8[] I4 U4'
- doubles numb addr (numb×8)
+ ⎕NA 'dyalog32|MEMCPY >F8[] I4 U4'
+ MEMCPY numb addr (numb×8)
```
Notice that:
-- As the first argument to `doubles` is an output argument, we must supply the number of elements to reserve for the output data.
+- As the first argument to `MEMCPY` is an output argument, we must supply the number of elements to reserve for the output data.
- `MEMCPY` is defined to take the number of *bytes* to copy, so we must multiply the number of elements by the element size in bytes.
Example
@@ -585,12 +582,6 @@ typedef struct {
} person;
```
-Then, having previously allocated memory (`addr`) to receive the record, we can define:
-```apl
- 'prec' ⎕NA 'dyalog64|MEMCPY P <{P F4 T[20]} P'
- prec addr(99 12345.60 'Charlie Brown')(4+4+20)
-```
-
### STRNCPY
`STRNCPY` is used to copy null-terminated strings between memory buffers.
@@ -622,10 +613,10 @@ typedef struct { // null-terminated strings:
To copy the names *from* the structure:
```apl
- 'get'⎕NA'dyalog64|STRNCPY >0T1[] P U4'
- get 20 addr 20
+ ⎕NA'dyalog64|STRNCPY >0T1[] P U4'
+ STRNCPY 20 addr 20
Charlie
- get 20 (addr+20) 20
+ STRNCPY 20 (addr+20) 20
Brown
```
@@ -633,12 +624,14 @@ Note that (as this is a 64-bit example), `⎕FR` must be 1287 for the addition t
To copy data *from* the workspace *into* an already allocated (`new`) structure:
```apl
- 'put'⎕NA'dyalog32|STRNCPY I4 <0T[] U4'
- put new 'Bo' 20
- put (new+4) 'Peep' 20
+ ⎕NA'dyalog32|STRNCPY I4 <0T[] U4'
+ STRNCPY new 'Bo' 20
+ STRNCPY (new+4) 'Peep' 20
```
-Notice in this example that you must ensure that names no longer than 19 characters are passed to `put`. More than 19 characters would not leave `STRNCPY` enough space to include the trailing null, which would probably cause the application to fail.
+Notice in this example that you must ensure that names no longer than 19 characters are passed to `STRNCPY`. More than 19 characters would not leave `STRNCPY` enough space to include the trailing null, which would probably cause the application to fail.
+
+To make both these functionalities available simultaneously, [associate each with a custom name](na-dyadic.md).
### STRNCPYA
@@ -662,9 +655,9 @@ Suppose that a database application returns a pointer (`addr`) to a null-termina
To copy the string into the workspace:
```apl
- 'len'⎕NA'P dyalog32|STRLEN P'
- 'cpy'⎕NA'dyalog32|MEMCPY >T[] P P'
- cpy l addr (l←len addr)
+ ⎕NA'P dyalog32|STRLEN P'
+ ⎕NA'dyalog32|MEMCPY >T[] P P'
+ MEMCPY l addr (l←STRLEN addr)
Bartholemew
```
@@ -682,20 +675,13 @@ The Windows function `GetCaretBlinkTime` retrieves the caret blink rate. It ta
UINT GetCaretBlinkTime(void);
```
-The following statements would provide access to this routine through an APL function of the same name.
+The following statement would provide access to this routine through an APL function of the same name.
```apl
⎕NA 'U user32|GetCaretBlinkTime'
GetCaretBlinkTime
530
```
-The following statement would achieve the same thing, but using an APL function called `BLINK`.
-```apl
- 'BLINK' ⎕NA 'U user32|GetCaretBlinkTime'
- BLINK
-530
-```
-
### SetCaretBlinkTime()
The Microsoft Windows function `SetCaretBlinkTime` sets the caret blink rate. It takes a single unsigned `int` argument, does not return a result and is declared as follows:
@@ -718,7 +704,7 @@ The Microsoft Windows function `MessageBox` displays a standard dialog box on th
int MessageBox(HWND, LPCSTR, LPCSTR, UINT);
```
-The following statements provide access to this routine through an APL function of the same name. Note that the 2nd and 3rd arguments are both coded as input pointers to type T null-terminated character arrays which ensures portability between Editions.
+The following statement provides access to this routine through an APL function of the same name. Note that the 2nd and 3rd arguments are both coded as input pointers to type T null-terminated character arrays which ensures portability between Editions.
```apl
⎕NA 'I user32|MessageBox* P <0T <0T U'
```
@@ -743,15 +729,15 @@ The Microsoft Windows function `FindWindow` obtains the window handle of a windo
HWND FindWindow(LPCSTR, LPCSTR);
```
-The following statement associates the APL function `FW` with the second variant of the FindWindow call, where the class name is specified as a NULL pointer. To indicate that APL is to pass the *value* of the NULL pointer, rather than its address, we need to code this argument as `I4`.
+The following statement associates the second variant of the FindWindow call, where the class name is specified as a NULL pointer. To indicate that APL is to pass the *value* of the NULL pointer, rather than its address, we need to code this argument as `P`.
```apl
- 'FW' ⎕NA 'P user32|FindWindow* P <0T'
+ ⎕NA 'P user32|FindWindow* P <0T'
```
To obtain the handle of the window entitled "CLEAR WS - Dyalog APL/W":
```apl
- ⎕←HNDL←FW 0 'CLEAR WS - Dyalog APL/W'
+ ⎕←HNDL←FindWindow 0 'CLEAR WS - Dyalog APL/W'
59245156
```
@@ -777,11 +763,11 @@ was CLEAR WS
Then retrieve the new caption (max length 255) using window handle `HNDL` from the previous example:
```apl
]Display GetWindowText HNDL 255 255
-.→-------------------------.
-| .→------------------. |
-| 19 |MYWS - Dyalog APL/W| |
-| '-------------------' |
-'∊-------------------------'
+┌→─────────────────────────┐
+│ ┌→──────────────────┐ │
+│ 19 │MYWS - Dyalog APL/W│ │
+│ └───────────────────┘ │
+└∊─────────────────────────┘
```
There are three points to note.
@@ -797,11 +783,11 @@ For example:
⎕NA 'I User32|GetWindowText* P =0T I'
]Display GetWindowText HNDL (255⍴' ') 255
-.→-------------------------.
-| .→------------------. |
-| 19 |MYWS - Dyalog APL/W| |
-| '-------------------' |
-'∊-------------------------'
+┌→─────────────────────────┐
+│ ┌→──────────────────┐ │
+│ 19 │MYWS - Dyalog APL/W│ │
+│ └───────────────────┘ │
+└∊─────────────────────────┘
```
In this case, the second argument is coded as `=0T`, so when the function is called an array of the appropriate size must be supplied. This method uses more space in the workspace, although for small arrays (as in this case) the real impact of doing so is negligible.
@@ -818,86 +804,18 @@ The following statements provide access to this routine through an APL function
```apl
⎕NA 'U4 gdi32|GetCharWidth* P U U >I[]'
- 'Prin'⎕WC'Printer'
+ 'Prin'⎕WC'Printer'
]Display GetCharWidth ('Prin' ⎕WG 'Handle') 65 67 3
-.→-------------.
-| .→-------. |
-| 1 |50 50 50| |
-| '~-------' |
-'∊-------------'
+┌→─────────────┐
+│ ┌→───────┐ │
+│ 1 │50 50 50│ │
+│ └~───────┘ │
+└∊─────────────┘
```
Note: `'Prin'⎕WG'Handle'` returns a handle which is represented as a number. The number will be in the range (0 - 2*32] on a 32-bit version and (0 - 2*64] on a 64-bit version. These can be passed to a P type parameter. Older versions used a 32-bit signed integer.
-### The `quadna` workspace
-
-The following example from the supplied workspace: quadna.dws. `quadna` illustrates several techniques which are important in advanced `⎕NA` programming. Function `DllVersion` returns the major and minor version number for a given DLL. Note that this example assumes that the computer is running the 64-bit version of Dyalog.
-
-In advanced DLL programming, it is often necessary to administer memory outside APL's workspace. In general, the procedure for such use is:
-
-1. Allocate global memory.
-2. Lock the memory.
-3. Copy any DLL input information from workspace into memory.
-4. Call the DLL function.
-5. Copy any DLL output information from memory to workspace.
-6. Unlock the memory.
-7. Free the memory.
-
-Notice that steps 1 and 7 and steps 2 and 6 complement each other. That is, if you allocate global system memory, you must free it after you have finished using it. If you continue to use global memory without freeing it, your system will gradually run out of resources. Similarly, if you lock memory (which you must do before using it), then you should unlock it before freeing it. Although on some versions of Windows, freeing the memory will include unlocking it, in the interests of good style, maintaining the symmetry is probably a good thing.
-
-```apl
- ∇ version←DllVersion file;Alloc;Free;Lock;Unlock;Size
- ;Info;Value;Copy;size;hndl;addr;buff;ok
-[1]
-[2] 'Alloc'⎕NA'P kernel32|GlobalAlloc U4 P'
-[3] 'Free'⎕NA'P kernel32|GlobalFree P'
-[4] 'Lock'⎕NA'P kernel32|GlobalLock P'
-[5] 'Unlock'⎕NA'U4 kernel32|GlobalUnlock P'
-[6]
-[7] 'Size'⎕NA'U4 version|GetFileVersionInfoSize* <0T >U4'
-[8] 'Info'⎕NA'U4 version|GetFileVersionInfo*<0T U4 U4 P'
-[9] 'Value'⎕NA'U4 version|VerQueryValue* P <0T >P >U4'
-[10]
-[11] 'Copy'⎕NA'dyalog64|MEMCPY >U4[] P P'
-[12]
-[13] :If ×size←⊃Size file 0 ⍝ Size of info
-[14] :AndIf ×hndl←Alloc 0 size ⍝ Alloc memory
-[15] :If ×addr←Lock hndl ⍝ Lock memory
-[16] :If ×Info file 0 size addr ⍝ Version info
-[17] ok buff size←Value addr'\' 0 0 ⍝ Version value
-[18] :If ok
-[19] buff←Copy(size÷4)buff size ⍝ Copy info
-[20] version←(2/2*16)⊤⊃2↓buff ⍝ Split version
-[21] :EndIf
-[22] :EndIf
-[23] ok←Unlock hndl ⍝ Unlock memory
-[24] :EndIf
-[25] ok←Free hndl ⍝ Free memory
-[26] :EndIf
- ∇
-```
-
-Lines [2-11] associate APL function names with the DLL functions that will be used.
-
-Lines [2-5] associate functions to administer global memory.
-
-Lines [7-9] associate functions to extract version information from a DLL.
-
-Line[11] associates `Copy` with `MEMCPY` function from **dyalog64.dll**.
-
-Lines [13-26] call the DLL functions.
-
-Line [13] requests the size of buffer required to receive version information for the DLL. A size of 0 will be returned if the DLL does not contain version information.
-
-**Notice that** care is taken to balance memory allocation and release:
-
-On line [14], the :If clause is taken only if the global memory allocation is successful, in which case (and only then) a corresponding Free is called on line [25].
-
-Unlock on line[23] is called if and only if the call to Lock on line [15] succeeds.
-
-A result is returned from the function *only* if all the calls are successful Otherwise, the calling environment will sustain a `VALUE ERROR`.
-
### More Examples
```apl
@@ -947,7 +865,6 @@ A result is returned from the function *only* if all the calls are successful Ot
⎕NA'P user32 |SetFocus P'
⎕NA'I4 user32 |WinHelp* P <0T U4 P'
⎕NA'I4 winnm |sndPlaySound <0T U4'
-
```
diff --git a/language-reference-guide/docs/system-functions/ncopy.md b/language-reference-guide/docs/system-functions/ncopy.md
index ff876bee8b2..1f07c8cc5d7 100644
--- a/language-reference-guide/docs/system-functions/ncopy.md
+++ b/language-reference-guide/docs/system-functions/ncopy.md
@@ -25,7 +25,7 @@ The shy result `R` contains count(s) of top-level items copied. If `Y` is a sing
|---|---|
|0 { .shaded } |The name or names in `Y` identifies a specific file name.|
-|`1`|The name or names in `Y` that specify the *base name* and *extension* (see [NParts](./nparts.md) ), may also contain the wildcard characters "?" and "*". An asterisk is a substitute for any 0 or more characters in a file name or extension; a question-mark is a substitute for any single character.|
+|`1`|The name or names in `Y` that specify the *base name* and *extension* (see [NParts](./nparts-monadic.md) ), may also contain the wildcard characters "?" and "*". An asterisk is a substitute for any 0 or more characters in a file name or extension; a question-mark is a substitute for any single character.|
Note that when **Wildcard** is 1, element(s) of `R` can be 0, 1 or `>1`. If **Wildcard** is 0, elements of `R` are always 1.
diff --git a/language-reference-guide/docs/system-functions/ncreate.md b/language-reference-guide/docs/system-functions/ncreate.md
index b473427a358..dbb81b8b714 100644
--- a/language-reference-guide/docs/system-functions/ncreate.md
+++ b/language-reference-guide/docs/system-functions/ncreate.md
@@ -19,7 +19,7 @@ The shy result of `⎕NCREATE` is the tie number of the new file.
|---|---|
|0 { .shaded } |the file named by `X` will be created|
-|`1`|a uniquely named file will be created by extending the base name (see [File Name Parts](nparts.md) ) with random characters. If a unique name cannot be created then an error will be signalled. The actual name of the file can be determined from `⎕NNAMES` or `⎕NINFO` .|
+|`1`|a uniquely named file will be created by extending the base name (see [File Name Parts](nparts-monadic.md) ) with random characters. If a unique name cannot be created then an error will be signalled. The actual name of the file can be determined from `⎕NNAMES` or `⎕NINFO` .|
## IfExists Option (character vector)
diff --git a/language-reference-guide/docs/system-functions/ndelete-disambiguation.md b/language-reference-guide/docs/system-functions/ndelete-disambiguation.md
new file mode 100644
index 00000000000..6843a53a7a0
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/ndelete-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Native File Delete `⎕NDELETE`
+
+## Monadic `⎕NDELETE` means
+
+[Delete Native File](ndelete-monadic.md)
+
+## Dyadic `⎕NDELETE` means
+
+[Custom Delete Native File](ndelete-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/ndelete.md b/language-reference-guide/docs/system-functions/ndelete-dyadic.md
similarity index 67%
rename from language-reference-guide/docs/system-functions/ndelete.md
rename to language-reference-guide/docs/system-functions/ndelete-dyadic.md
index 0d8909d1715..549a7fe9301 100644
--- a/language-reference-guide/docs/system-functions/ndelete.md
+++ b/language-reference-guide/docs/system-functions/ndelete-dyadic.md
@@ -3,16 +3,16 @@ search:
boost: 2
---
-# Native File Delete `{R}←{X}⎕NDELETE Y`{{key}}
+# Custom Delete Native File `{R}←X ⎕NDELETE Y`{{key}}
This function deletes files and directories.
`Y` is a character vector or scalar containing a single file or directory name, or a vector of character vectors containing zero or more file or directory names. Names must conform to the naming rules of the host Operating System.
-The optional left argument `X` is a numeric scalar; valid values are shown in the following table. If omitted, its default value is 0.
+The left argument `X` is a numeric scalar; valid values are shown in the following table. `X=0` is equivalent to [monadic `⎕NDELETE`](ndelete-monadic.md).
|---|------------------------------------------------------------------------------------------|
-|0 { .shaded } |Each file or directory with the given name must exist. |
+|`0`|Each file or directory with the given name must exist. |
|`1`|If the file or directory with the given name does not exist then no action is taken. The result `R` may be used to determine whether the file or directory was deleted or not.|
|`2`|If a name identifies a non-empty directory it, and all its contents, are to be deleted. |
|`3`|Combination of 1 and 2. |
@@ -26,49 +26,27 @@ The optional left argument `X` is a numeric scalar; valid values are shown in t
## Wildcard Option (Boolean)
|---|---|
-|0 { .shaded } |The name or names in `Y` identifies a specific file name.|
-|`1`|The name or names in `Y` that specify the *base name* and *extension* (see [File Name Parts](./nparts.md)), may also contain the wildcard characters "?" and "*". An asterisk is a substitute for any 0 or more characters in a file name or extension; a question-mark is a substitute for any single character.|
+|`0` (default) |The name or names in `Y` identifies a specific file name.|
+|`1`|The name or names in `Y` that specify the *base name* and *extension* (see [File Name Parts](./nparts-monadic.md)), may also contain the wildcard characters "?" and "*". An asterisk is a substitute for any 0 or more characters in a file name or extension; a question-mark is a substitute for any single character.|
Note that when Wildcard is 1, element(s) of `R` can be 0 or `>1`. If Wildcard is 0, elements of `R` are always 1.
If `Y` specifies the name of a symbolic link, `⎕NDELETE` deletes that symbolic link; the target of the symbolic link is unaffected.
Examples
-```apl
-
- ⎕NEXISTS'/Users/Pete/Documents/temp/t1/t2'
-1
- ⊢⎕NDELETE'/Users/Pete/Documents/temp/t1/t2'
-1
- ⊢⎕NDELETE'/Users/Pete/Documents/temp/t1/t2'
-FILE NAME ERROR: Invalid file or directory name ("The system cannot find the file specified.")
- ⊢⎕NDELETE'/Users/Pete/Documents/temp/t1/t2'
- ∧
-```
```apl
-
⊢1 ⎕NDELETE'/Users/Pete/Documents/temp/t1/t2'
0
- ⊢⎕NDELETE 'temp1' 'temp2'
-1 1
⊢⎕MKDIR'temp1' 'temp2'
1 1
- ⊢(⎕NDELETE⍠1)'t*'
-2
-```
-```apl
+
⊢⎕MKDIR'temp1'
1
⊢'Hello World' ⎕NPUT 'temp1/hw.txt'
13
- ⊢⎕NDELETE 'temp1'
-FILE ACCESS ERROR: temp1: Unable to delete directory ("The directory is not empty.")
- ⊢⎕NDELETE'temp1'
- ∧
⊢2 ⎕NDELETE 'temp1'
1
-
```
If the file is in use or the current user is not authorised to delete it, `⎕NDELETE` will not succeed but will instead generate a `FILE ACCESS ERROR`.
diff --git a/language-reference-guide/docs/system-functions/ndelete-monadic.md b/language-reference-guide/docs/system-functions/ndelete-monadic.md
new file mode 100644
index 00000000000..829f4c67b9f
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/ndelete-monadic.md
@@ -0,0 +1,68 @@
+---
+search:
+ boost: 2
+---
+
+# Delete Native File `{R}←⎕NDELETE Y`{{key}}
+
+This function deletes files and directories.
+
+`Y` is a character vector or scalar containing a single file or directory name, or a vector of character vectors containing zero or more file or directory names. Names must conform to the naming rules of the host Operating System.
+
+Each file or directory named in `Y` must exist, and directories to be deleted must be empty. Use [dyadic `⎕NDELETE`](ndelete-dyadic.md) when these conditions might not be fulfilled.
+
+`R` is a numeric count of top-level entities deleted when processing the corresponding name in `Y`. If `Y` specifies a single name, `R` is a scalar. If `Y` is a vector of character vectors `R` is a vector with the same length as `Y`.
+
+## Variant Options
+
+`⎕NDELETE` may be applied using the Variant operator with the Wildcard option.
+
+## Wildcard Option (Boolean)
+
+|---|---|
+|`0` (default) |The name or names in `Y` identifies a specific file name.|
+|`1`|The name or names in `Y` that specify the *base name* and *extension* (see [File Name Parts](./nparts-monadic.md)), may also contain the wildcard characters "?" and "*". An asterisk is a substitute for any 0 or more characters in a file name or extension; a question-mark is a substitute for any single character.|
+
+Note that when Wildcard is 1, element(s) of `R` can be 0 or `>1`. If Wildcard is 0, elements of `R` are always 1.
+
+If `Y` specifies the name of a symbolic link, `⎕NDELETE` deletes that symbolic link; the target of the symbolic link is unaffected.
+
+Examples
+
+```apl
+ ⎕NEXISTS'/Users/Pete/Documents/temp/t1/t2'
+1
+ ⊢⎕NDELETE'/Users/Pete/Documents/temp/t1/t2'
+1
+ ⊢⎕NDELETE'/Users/Pete/Documents/temp/t1/t2'
+FILE NAME ERROR: Invalid file or directory name ("The system cannot find the file specified.")
+ ⊢⎕NDELETE'/Users/Pete/Documents/temp/t1/t2'
+ ∧
+
+ ⊢⎕NDELETE 'temp1' 'temp2'
+1 1
+ ⊢⎕MKDIR'temp1' 'temp2'
+1 1
+ ⊢(⎕NDELETE⍠1)'t*'
+2
+
+ ⊢⎕MKDIR'temp1'
+1
+ ⊢'Hello World' ⎕NPUT 'temp1/hw.txt'
+13
+ ⊢⎕NDELETE 'temp1'
+FILE ACCESS ERROR: temp1: Unable to delete directory ("The directory is not empty.")
+ ⊢⎕NDELETE'temp1'
+ ∧
+```
+
+If the file is in use or the current user is not authorised to delete it, `⎕NDELETE` will not succeed but will instead generate a `FILE ACCESS ERROR`.
+
+## Note
+
+When multiple names are specified they are processed in the order given. If an error occurs at any point whilst deleting files or directories, processing will immediately stop and an error will be signalled. The operation is not atomic; the directory contents may be partially deleted before this happens. In the event of an error there will be no result and therefore no indication of how many files were deleted before the error occurred.
+
+
+
+ ⎕NDELETE NDELETE
+
diff --git a/language-reference-guide/docs/system-functions/nexists.md b/language-reference-guide/docs/system-functions/nexists.md
index abcc9c9d3a1..b48fb9bbb3f 100644
--- a/language-reference-guide/docs/system-functions/nexists.md
+++ b/language-reference-guide/docs/system-functions/nexists.md
@@ -19,7 +19,7 @@ If `Y` specifies a single name, the result `R` is a scalar 1 if a file or direct
|---|---|
|0|The name or names in `Y` identifies a specific file name.|
-|`1`|The name or names in `Y` that specify the *base name* and *extension* (see [NParts](./nparts.md) ), may also contain the wildcard characters "?" and "*". An asterisk is a substitute for any 0 or more characters in a file name or extension; a question-mark is a substitute for any single character.|
+|`1`|The name or names in `Y` that specify the *base name* and *extension* (see [NParts](./nparts-monadic.md) ), may also contain the wildcard characters "?" and "*". An asterisk is a substitute for any 0 or more characters in a file name or extension; a question-mark is a substitute for any single character.|
If the Wildcard option is 1, `R` indicates whether or not one or more matches to the corresponding pattern in `Y` exist.
diff --git a/language-reference-guide/docs/system-functions/nget-disambiguation.md b/language-reference-guide/docs/system-functions/nget-disambiguation.md
new file mode 100644
index 00000000000..d5cacf220b2
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/nget-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Read Text File `⎕NGET`
+
+## Monadic `⎕NGET` means
+
+[Get Text File Content](nget-monadic.md)
+
+## Dyadic `⎕NGET` means
+
+[Decode Text File Content](nget-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/nget.md b/language-reference-guide/docs/system-functions/nget-dyadic.md
similarity index 79%
rename from language-reference-guide/docs/system-functions/nget.md
rename to language-reference-guide/docs/system-functions/nget-dyadic.md
index 9179f4c3721..95981dbad53 100644
--- a/language-reference-guide/docs/system-functions/nget.md
+++ b/language-reference-guide/docs/system-functions/nget-dyadic.md
@@ -3,7 +3,7 @@ search:
boost: 2
---
-# Read Text File `R←{X} ⎕NGET Y`{{key}}
+# Decode Text File Content `R←X ⎕NGET Y`{{key}}
This function reads the contents of the specified text file. See also [Write Text File](nput.md).
@@ -11,12 +11,12 @@ This function reads the contents of the specified text file. See also [Write Tex
- if `flags` is `0` then `R[1]` is a character vector. This is the default.
- if `flags` is `1` then `R[1]` is a nested array of character vectors.
-- if `flags` is `2` then `R[1]` is a matrix, with each row corresponding to a line in the text file specified within `X`.
+- if `flags` is `2` then `R[1]` is a matrix, with each row corresponding to a line in the text file specified within `Y`.
-The optional left-argument `X` is either
+The left-argument `X` specifies the file encoding. (Use [monadic `⎕NGET`](nget-monadic.md) to let the APL interpreter try to decide the file encoding.) `X` is either
- a character vector that specifies the file-encoding as shown in the table below.
-- a 256-element numeric vector that maps each possible byte value (0-255) to a Unicode code point (1st element = Unicode code point corresponding to byte value 0, and so on). ¯1 indicates that the corresponding byte value is not mapped to any character. Apart from ¯1, no value may appear in the table more than once.
+- a 256-element numeric vector that maps each possible byte value (`0`-`255`) to a Unicode code point (1st element = Unicode code point corresponding to byte value `0`, and so on). `¯1` indicates that the corresponding byte value is not mapped to any character. Apart from `¯1`, no value may appear in the table more than once.
Table: File Encodings {: #Encodings }
@@ -35,13 +35,13 @@ Table: File Encodings {: #Encodings }
The above UTF formats may be qualified with -BOM or -NOBOM (for example, UTF-8-BOM). See [Write Text File](nput.md).
-Whether or not `X` is specified, if the start of the file contains a recognised Byte Order Mark (BOM), the file is decoded according to the BOM. Otherwise, if `X` is specified the file is decoded according to the value of `X`. Otherwise, the file is examined to try to decide its encoding and is decoded accordingly.
+If the start of the file contains a recognised Byte Order Mark (BOM), the file is decoded according to the BOM. Otherwise, the file is decoded according to the value of `X`.
The result `R` is a 3-element vector comprising `(content) (encoding) (newline)` where:
|---|---|
|`content`|A simple character vector, or a vector of character vectors, according to the value of `flags` .|
-|`encoding`|The encoding that was actually used to read the file. If this is a UTF format, it will always include the appropriate endianness (except for UTF-8 to which endianness doesn't apply) and a -BOM or -NOBOM suffix to indicate whether or not a BOM is actually present in the file. For example, UTF-16LE-BOM. If `X` specified a user-defined encoding as a 256-element numeric vector, `encoding` will be that same vector.|
+|`encoding`|The encoding that was used to read the file. If this is a UTF format, it will always include the appropriate endianness (except for UTF-8 to which endianness doesn't apply) and a -BOM or -NOBOM suffix to indicate whether or not a BOM is actually present in the file. For example, UTF-16LE-BOM. If `X` specified a user-defined encoding as a 256-element numeric vector, `encoding` will be that same vector.|
|`newline`|Determined by the first occurrence in the file of one of the newline characters identified in the line separator table, or `⍬` if no such line separator is found.|
If `content` is simple then all its line separators (listed in the table below) are replaced by (normalised to) `⎕UCS 10`, which in the Classic Edition must be in `⎕AVU` (else `TRANSLATION ERROR`).
diff --git a/language-reference-guide/docs/system-functions/nget-monadic.md b/language-reference-guide/docs/system-functions/nget-monadic.md
new file mode 100644
index 00000000000..d58ce18c47d
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/nget-monadic.md
@@ -0,0 +1,49 @@
+---
+search:
+ boost: 2
+---
+
+# Get Text File Content `R←⎕NGET Y`{{key}}
+
+This function reads the contents of the specified text file. See also [Write Text File](nput.md).
+
+`Y` is either a character vector/scalar containing the name of the file to be read, or a 2-item vector whose first item is the file name and whose second is an integer scalar specifying `flags` for the operation.
+
+- if `flags` is `0` then `R[1]` is a character vector. This is the default.
+- if `flags` is `1` then `R[1]` is a nested array of character vectors.
+- if `flags` is `2` then `R[1]` is a matrix, with each row corresponding to a line in the text file specified within `Y`.
+
+If the start of the file contains a recognised Byte Order Mark (BOM), the file is decoded according to the BOM. Otherwise, the file is examined to try to decide its encoding and is decoded accordingly. Use [dyadic `⎕NGET`](nget-dyadic.md) to specify the encoding manually.
+
+The result `R` is a 3-element vector comprising `(content) (encoding) (newline)` where:
+
+|---|---|
+|`content`|A simple character vector, or a vector of character vectors, according to the value of `flags` .|
+|`encoding`|The encoding that was actually used to read the file. If this is a UTF format, it will always include the appropriate endianness (except for UTF-8 to which endianness doesn't apply) and a -BOM or -NOBOM suffix to indicate whether or not a BOM is actually present in the file. For example, UTF-16LE-BOM.|
+|`newline`|Determined by the first occurrence in the file of one of the newline characters identified in the line separator table, or `⍬` if no such line separator is found.|
+
+If `content` is simple then all its line separators (listed in the table below) are replaced by (normalised to) `⎕UCS 10`, which in the Classic Edition must be in `⎕AVU` (else `TRANSLATION ERROR`).
+
+If `content` is nested, it is formed by splitting the contents of the file on the occurrence of any of the line separators shown in the table below. These line separators are removed.
+
+The 3rd element of the result `newline` is a numeric vector from the *Value* column of the table below corresponding to the first occurrence of any of the **newline characters** in the file. If none of these characters are present, the value is `⍬`.
+
+Table: Line separators: {: #Line_Separators }
+
+|Value |Code |Description |
+|-------------------------------|------|-------------------------------------|
+|newline characters |||
+|13 |`CR` |Carriage Return (U+000D) |
+|10 |`LF` |Line Feed (U+000A) |
+|13 10 |`CRLF`|Carriage Return followed by Line Feed|
+|133 |`NEL` |New Line (U+0085) |
+|other line separator characters |||
+|11 |`VT` |Vertical Tab (U+000B) |
+|12 |`FF` |Form Feed (U+000C) |
+|8232 |`LS` |Line Separator (U+2028) |
+|8233 |`PS` |Paragraph Separator (U+2029) |
+
+
+
+ ⎕NGET NGET
+
diff --git a/language-reference-guide/docs/system-functions/ninfo-disambiguation.md b/language-reference-guide/docs/system-functions/ninfo-disambiguation.md
new file mode 100644
index 00000000000..f18647ab154
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/ninfo-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Native File Information `⎕NINFO`
+
+## Monadic `⎕NINFO` means
+
+[Native File Name](ninfo-monadic.md)
+
+## Dyadic `⎕NINFO` means
+
+[Native File Information](ninfo-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/ninfo.md b/language-reference-guide/docs/system-functions/ninfo-dyadic.md
similarity index 75%
rename from language-reference-guide/docs/system-functions/ninfo.md
rename to language-reference-guide/docs/system-functions/ninfo-dyadic.md
index e316de0f652..9ae605ff2da 100644
--- a/language-reference-guide/docs/system-functions/ninfo.md
+++ b/language-reference-guide/docs/system-functions/ninfo-dyadic.md
@@ -3,7 +3,7 @@ search:
boost: 2
---
-# Native File Information `R←{X}⎕NINFO Y`{{key}}
+# Native File Information `R←X ⎕NINFO Y`{{key}}
This function queries or sets information about one or more files or directories. `Y` may be:
@@ -11,16 +11,14 @@ This function queries or sets information about one or more files or directories
- a character vector or scalar containing a file or directory name that conforms to the naming rules of the host Operating System.
- a vector of character vectors and/or tie numbers
-Optionally, `X` specifies properties of the files/directories identifed in `Y`. `X` can be an array of any shape; the shape determines whether the specified properties are queried or set:
+`X` specifies properties of the files/directories identifed in `Y`. `X` can be an array of any shape; the shape determines whether the specified properties are queried or set:
- If `X` is a simple numeric array, the properties are queried. In this case, the values of `X` correspond to properties of the file/directory specified in `Y` that are to be queried, as defined in the following table.
- If some or all of the elements in `X` are nested vectors, the properties are set. In this case, the values of `X` correspond to properties of the file/directory specified in `Y` that are to be set, as defined in the following table, with appropriate corresponding values to which those properties should be set. Not all file properties are settable.
-If `X` is not defined, it is assumed to be `0`.
-
|`X`|Property|Default|Settable|
|---|---|---|---|
-|`0`|Name of the file or directory, as a character vector. If `Y` is a tie number then this is the name which the file was tied.| |No|
+|`0`|Name of the file or directory, as a character vector. If `Y` is a tie number then this is the name which the file was tied. (Equivalent to [monadic `⎕NINFO`](ninfo-monadic.md).)| |No|
|`1`|Type, as a numeric scalar: 0=Not known 1=Directory 2=Regular file 3=Character device 4=Symbolic link (only when Follow is 0) 5=Block device 6=FIFO (not Windows) 7=Socket (not Windows)|`0`|No|
|`2`|Size in bytes, as a numeric scalar|`0`|Yes|
|`3`|Last modification time, as a timestamp in `⎕TS` format|`7⍴0`|No|
@@ -52,11 +50,11 @@ The returned value `R` has the same shape as `X` (if the **Wildcard** variant op
If a property value cannot be obtained, the default value (shown in the table above) is returned for that property.
-If the Wildcard option is not enabled (the default) then `Y` specifies exactly one file or directory and must exist. In this case each element in `R` is a single property value for that file. If the name in `Y` does not exist, the function signals an error. On non-Windows platforms "*" and "?" are treated as normal characters. On Microsoft Windows an error will be signalled since neither are valid characters for file or directory names.
+If the Wildcard option is not enabled (the default) then `Y` specifies exactly one file or directory and must exist. In this case each element in `R` is a single property value for that file. If the name in `Y` does not exist, the function signals an error. On non-Windows platforms `*` and `?` are treated as normal characters. On Microsoft Windows an error will be signalled since neither are valid characters for file or directory names.
If the Wildcard option is enabled, zero or more files and/or directories may match the pattern in `Y`. In this case each element in `R` is a vector of property values for each of the files. Note that no error will be signalled if no files match the pattern.
-When using the **Wildcard** option, matching of names is done case insensitively on Windows and macOS, and case sensitively on other platforms. The names '.' and '..' are excluded from any matches. The order in which the names match is not defined.
+When using the **Wildcard** option, matching of names is done case insensitively on Windows and macOS, and case sensitively on other platforms. The names `.` and `..` are excluded from any matches. The order in which the names match is not defined.
## Variant Options
@@ -65,13 +63,13 @@ When using the **Wildcard** option, matching of names is done case insensitively
### Wildcard Option (Boolean)
|---|---|
-|0 { .shaded } |The name or names in `Y` identifies a specific file name.|
-|`1`|The name or names in `Y` that specify the *base name* and *extension* (see [NParts](./nparts.md) ), may also contain the wildcard characters "?" and "*". An asterisk is a substitute for any 0 or more characters in a file name or extension; a question-mark is a substitute for any single character.|
+|`0` (default)|The name or names in `Y` identifies a specific file name.|
+|`1`|The name or names in `Y` that specify the *base name* and *extension* (see [`⎕NPARTS`](./nparts-monadic.md) ), may also contain the wildcard characters `?` and `*`. An asterisk is a substitute for any 0 or more characters in a file name or extension; a question-mark is a substitute for any single character.|
### Recurse Option
|---|---|
-|0 { .shaded } |the name(s) in `Y` are searched for only in the corresponding specified directory.|
+|`0` (default)|the name(s) in `Y` are searched for only in the corresponding specified directory.|
|`1`|the name(s) in `Y` are searched for in the corresponding specified directory as well as all sub-directories. If **Wildcard** is also 1, the wild card search is performed recursively.|
|`1 n`|the name(s) in `Y` are searched for in the corresponding specified directory as well as its sub-directories to the n th -level sub-directory. If n is 0, no sub-directories are searched. If n is `¯1` all sub-directories are searched.|
|`2 (n)`|same as 1 but if any unreadable directories are encountered they are skipped (whereas if **Recurse** is `1 (n)` , `⎕NINFO` stops and generates an error).|
@@ -80,7 +78,7 @@ When using the **Wildcard** option, matching of names is done case insensitively
|---|----------------------------------------------------------------------------------------|
|`0`|the properties reported are those of the symbolic link itself |
-|1 { .shaded } |the properties reported for a symbolic link are those of the target of the symbolic link|
+|`1` (default)|the properties reported for a symbolic link are those of the target of the symbolic link|
### ProgressCallback Option
@@ -107,26 +105,6 @@ In the Classic Edition, offending bytes are replaced by the `?` symbol, which me
│ └───────────────────────┘ │
└∊───────────────────────────────────┘
-```
-```apl
- ⊃1⎕NPARTS '' ⍝ current working directory
-c:/Users/Pete/
- (⎕NINFO⍠1)'D*'
-┌─────────────────────────────────────┐
-│┌───────┬─────────┬─────────┬───────┐│
-││Desktop│Documents│Downloads│Dropbox││
-│└───────┴─────────┴─────────┴───────┘│
-└─────────────────────────────────────┘
-
-```
-```apl
- (⎕NINFO⍠1)'Documents/*.zip'
-┌──────────────────────┐
-│┌────────────────────┐│
-││Documents/dyalog.zip││
-│└────────────────────┘│
-└──────────────────────┘
-
```
```apl
⍪ (0,⍳6) ⎕NINFO 'Documents/dyalog.zip'
@@ -146,28 +124,6 @@ c:/Users/Pete/
│0 │
└──────────────────────────────────────────────┘
-```
-```apl
- ⊃1⎕NPARTS '' ⍝ current working directory
-C:/Users/Pete/Documents/Dyalog APL-64 16.0 Unicode Files/
- (⎕NINFO⍠1)'*.*'
-┌──────────────────────────────────────────────────────┐
-│┌───────────┬──────────┬─────────┬───────────────────┐│
-││default.dlf│def_uk.dse│jsonx.dws│UserCommand20.cache││
-│└───────────┴──────────┴─────────┴───────────────────┘│
-└──────────────────────────────────────────────────────┘
-
-```
-```apl
- ⊢ ⎕MKDIR 'd1' 'd2'
-1 1
- 'a'∘⎕NPUT¨'find' 'd1/find' 'd1/nofind' 'd2/find'
- (⎕NINFO⍠'Recurse' 1)'find'
-┌──────────────────────┐
-│┌───────┬───────┬────┐│
-││d1/find│d2/find│find││
-│└───────┴───────┴────┘│
-└──────────────────────┘
```
The next set of examples illustrates the use of the **Recurse** variant option to limit the sub-directory depth.
@@ -183,13 +139,7 @@ The next set of examples illustrates the use of the **Recurse** variant option t
4223
```
-The following expression will return all Microsoft Word documents (`.docx` and `.doc`) in the current directory, searching recursively through any sub-directories:
-```apl
- (⎕NINFO⍠('Recurse' 1)('Wildcard' 1))'*.docx' '*.doc'
-```
-
The following expression "touches" files, that is, it sets their last modification time to the current UTC time:
-
```apl
(⊂13(1 ⎕DT'Z'))(⎕NINFO⍠1)'*.txt'
┌───────────────────────┐
diff --git a/language-reference-guide/docs/system-functions/ninfo-monadic.md b/language-reference-guide/docs/system-functions/ninfo-monadic.md
new file mode 100644
index 00000000000..4edd918697b
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/ninfo-monadic.md
@@ -0,0 +1,129 @@
+---
+search:
+ boost: 2
+---
+
+# Native File Name `R←⎕NINFO Y`{{key}}
+
+This function returns the name of one or more files or directories. `Y` may be:
+
+- a numeric scalar containing the tie number of a native file
+- a character vector or scalar containing a file or directory name that conforms to the naming rules of the host Operating System.
+- a vector of character vectors and/or tie numbers
+
+`R` is the name of the file or directory, as an enclosed character vector if `Y` refers to a single target or directory, or a vector of enclosed character vectors if `Y` refers to multiple targets. If `Y` contains a tie number, `R` contains the name by which the file was tied.
+
+Use [dyadic `⎕NINFO`](ninfo-dyadic.md) to obtain additional file properties.
+
+If the Wildcard option is not enabled (the default) then `Y` specifies exactly one file or directory and must exist. In this case each element in `R` is the name of that file. If the name in `Y` does not exist, the function signals an error. On non-Windows platforms `*` and `?` are treated as normal characters. On Microsoft Windows an error will be signalled since neither are valid characters for file or directory names.
+
+If the Wildcard option is enabled, zero or more files and/or directories may match the pattern in `Y`. In this case each element in `R` is a vector of the names of the matching files. Note that no error will be signalled if no files match the pattern.
+
+When using the **Wildcard** option, matching of names is done case insensitively on Windows and macOS, and case sensitively on other platforms. The names `.` and `..` are excluded from any matches. The order in which the names match is not defined.
+
+## Variant Options
+
+`⎕NINFO` may be applied using the _variant_ operator with the options **Wildcard** (the Principal option), **Recurse** and **ProgressCallback**.
+
+### Wildcard Option (Boolean)
+
+|---|---|
+|`0` (default)|The name or names in `Y` identifies a specific file name.|
+|`1`|The name or names in `Y` that specify the *base name* and *extension* (see [`⎕NPARTS`](./nparts-monadic.md) ), may also contain the wildcard characters `?` and `*`. An asterisk is a substitute for any 0 or more characters in a file name or extension; a question-mark is a substitute for any single character.|
+
+!!! Hint "Hints and Recommendations"
+ On a case-insensitive file system (default on Microsoft Windows and macOS), the canonical capitalisation of a filename can be obtained with `⊃⊃(⎕NINFO⍠1)filename`, though only the leaf name is canonicalised. For example:
+ ```apl
+ ⊃⊃(⎕NINFO⍠1)'/windows/inboxapps'
+ /windows/InboxApps
+ ```
+
+### Recurse Option
+
+|---|---|
+|`0` (default)|the name(s) in `Y` are searched for only in the corresponding specified directory.|
+|`1`|the name(s) in `Y` are searched for in the corresponding specified directory as well as all sub-directories. If **Wildcard** is also 1, the wild card search is performed recursively.|
+|`1 n`|the name(s) in `Y` are searched for in the corresponding specified directory as well as its sub-directories to the n th -level sub-directory. If n is 0, no sub-directories are searched. If n is `¯1` all sub-directories are searched.|
+|`2 (n)`|same as 1 but if any unreadable directories are encountered they are skipped (whereas if **Recurse** is `1 (n)` , `⎕NINFO` stops and generates an error).|
+
+### ProgressCallback Option
+
+The **ProgressCallback** variant option is described in the [Dyalog Programming Reference Guide](../../../programming-reference-guide/native-files#progress-callbacks). The following is specific to `⎕NINFO`:
+
+* The first element of the right argument to the callback function is the character vector `'⎕NINFO'`.
+* The third element of the right argument (the information namespace) contains an extra field named `Info`, which is a vector with the same length as the `Last` field. Each element of the `Info` vector contains the name of the corresponding file in `Last`.
+
+## Note
+
+On platforms other than Microsoft Windows, file names are exposed by the operating system using UTF-8 encoding, which Dyalog translates internally to characters.
+
+In the Unicode Edition, if the UTF-8 encoding is invalid, Dyalog replaces each offending byte with a unique Unicode symbol (in the *Low Surrogate Area* of the Unicode charts) that is mapped back to the original byte by the other system functions (including `⎕NTIE` and `⎕NDELETE`) that take native file names as arguments. The display of a file name containing these mapped bytes may appear strange.
+
+In the Classic Edition, offending bytes are replaced by the `?` symbol, which means that the names reported do not accurately identify the files.
+
+Examples
+```apl
+ ⊃1⎕NPARTS '' ⍝ current working directory
+c:/Users/Pete/
+ (⎕NINFO⍠1)'D*'
+┌─────────────────────────────────────┐
+│┌───────┬─────────┬─────────┬───────┐│
+││Desktop│Documents│Downloads│Dropbox││
+│└───────┴─────────┴─────────┴───────┘│
+└─────────────────────────────────────┘
+
+```
+```apl
+ (⎕NINFO⍠1)'Documents/*.zip'
+┌──────────────────────┐
+│┌────────────────────┐│
+││Documents/dyalog.zip││
+│└────────────────────┘│
+└──────────────────────┘
+
+```
+```apl
+ ⊃1⎕NPARTS '' ⍝ current working directory
+C:/Users/Pete/Documents/Dyalog APL-64 16.0 Unicode Files/
+ (⎕NINFO⍠1)'*.*'
+┌──────────────────────────────────────────────────────┐
+│┌───────────┬──────────┬─────────┬───────────────────┐│
+││default.dlf│def_uk.dse│jsonx.dws│UserCommand20.cache││
+│└───────────┴──────────┴─────────┴───────────────────┘│
+└──────────────────────────────────────────────────────┘
+
+```
+```apl
+ ⊢ ⎕MKDIR 'd1' 'd2'
+1 1
+ 'a'∘⎕NPUT¨'find' 'd1/find' 'd1/nofind' 'd2/find'
+ (⎕NINFO⍠'Recurse' 1)'find'
+┌──────────────────────┐
+│┌───────┬───────┬────┐│
+││d1/find│d2/find│find││
+│└───────┴───────┴────┘│
+└──────────────────────┘
+```
+
+The next set of examples illustrates the use of the **Recurse** variant option to limit the sub-directory depth.
+```apl
+ Y←'d:\bouzouki\*.*'
+ ⍴⊃(⎕NINFO⍠('Wildcard' 1)('Recurse' 0))Y
+355
+ ⍴⊃(⎕NINFO⍠('Wildcard' 1)('Recurse' (1 0)))Y
+355
+ ⍴⊃(⎕NINFO⍠('Wildcard' 1)('Recurse' (1 1)))Y
+1333
+ ⍴⊃(⎕NINFO⍠('Wildcard' 1)('Recurse' (1 3)))Y
+4223
+```
+
+The following expression will return all Microsoft Word documents (`.docx` and `.doc`) in the current directory, searching recursively through any sub-directories:
+```apl
+ (⎕NINFO⍠('Recurse' 1)('Wildcard' 1))'*.docx' '*.doc'
+```
+
+
+
+ ⎕NINFO NINFO
+
diff --git a/language-reference-guide/docs/system-functions/nl-disambiguation.md b/language-reference-guide/docs/system-functions/nl-disambiguation.md
new file mode 100644
index 00000000000..5e08b58f9bd
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/nl-disambiguation.md
@@ -0,0 +1,27 @@
+---
+search:
+ exclude: true
+---
+
+# Name List `⎕NL`
+
+## Monadic `⎕NL` means
+
+[List Object Names](nl-monadic.md)
+```apl
+ plus←+ ⋄ power←* ⋄ minus←-
+ ⎕NL 3
+minus
+plus
+power
+```
+
+## Dyadic `⎕NL` means
+
+[List Object Names with Filter](nl-dyadic.md)
+```apl
+ plus←+ ⋄ power←* ⋄ minus←-
+ 'p'⎕NL 3
+plus
+power
+```
diff --git a/language-reference-guide/docs/system-functions/nl.md b/language-reference-guide/docs/system-functions/nl-dyadic.md
similarity index 73%
rename from language-reference-guide/docs/system-functions/nl.md
rename to language-reference-guide/docs/system-functions/nl-dyadic.md
index 09916f3c4d2..faffadfb6e6 100644
--- a/language-reference-guide/docs/system-functions/nl.md
+++ b/language-reference-guide/docs/system-functions/nl-dyadic.md
@@ -3,42 +3,29 @@ search:
boost: 2
---
-# Name List `R←{X}⎕NL Y`{{key}}
+# List Object Names with Filter `R←X ⎕NL Y`{{key}}
`Y` must be a simple numeric scalar or vector containing one or more of the values for name-class. See also [Name Classification](nc.md).
-`X` is optional. If present, it must be a simple character scalar or vector. `R` is a list of the names of active objects whose name-class is included in `Y` in standard sorted order.
+To list the names without a character filter, use [monadic `⎕NL`](nl-monadic.md).
+
+`X` must be a simple character scalar or vector. `R` is a list of the names of active objects whose name-class is included in `Y` in standard sorted order.
If *any* element of `Y` is negative, positive values in `Y` are treated as if they were negative, and R is a vector of character vectors. Otherwise, `R` is simple character matrix.
Furthermore, if `⎕NL` is being evaluated inside the namespace associated with a Class or an Instance of a Class, and any element of `Y` is negative, `R` includes the Public names exposed by the Base Class (if any) and all other Classes in the Class hierarchy.
-If `X` is supplied, `R` contains only those names which begin with any character of `X`. Standard sorted order is in Unicode point order for Unicode editions, and in the collation order of `⎕AV` for Classic editions.
+`R` contains only those names which begin with any character of `X`. Standard sorted order is in Unicode point order for Unicode editions, and in the collation order of `⎕AV` for Classic editions.
If an element of `Y` is an integer, the names of all of the corresponding sub-name-classes are included in `R`. For example, if `Y` contains the value 2, the names of all variables (name-class 2.1), fields (2.2), properties (2.3) and external or shared variables (2.6) are obtained. Otherwise, only the names of members of the corresponding sub-name-class are obtained.
Examples
```apl
- ⎕NL 2 3
-A
-FAST
-FIND
-FOO
-V
-
'AV' ⎕NL 2 3
A
V
- ⎕NL ¯9
- Animal Bird BirdBehaviour Coin Cylinder DomesticParrot Eeyore FishBehaviour Nickel Parrot Penguin Polly Robin
- ⎕NL ¯9.3 ⍝ Instances
- Eeyore Nickel Polly Robin
- ⎕NL ¯9.4 ⍝ Classes
- Animal Bird Coin Cylinder DomesticParrot Parrot Penguin
- ⎕NL ¯9.5 ⍝ Interfaces
- BirdBehaviour FishBehaviour
```
`⎕NL` can also be used to explore Dyalog GUI Objects, .NET types and COM objects.
@@ -64,16 +51,6 @@ Close Create DragDrop Configure ContextMenu DropFiles DropObjects Expose
`⎕NL` can be used to explore .NET types.
When a reference is made to an undefined name, and `⎕USING` is set, APL attempts to load the Type from the appropriate .NET Assemblies. If successful, the name is entered into the symbol table with name-class 9.6.
-```apl
-
- ⎕USING←'System'
- DateTime
-(System.DateTime)
- ⎕NL -9
- DateTime
- ⎕NC,⊂'DateTime'
-9.6
-```
The names of the Properties and Methods of a .NET Type may then be obtained using `⎕NL`.
```apl
@@ -91,8 +68,6 @@ In fact it is not necessary to make a separate reference first, because the expr
Array.⎕NL -3
BinarySearch Clear Copy CreateInstance IndexOf LastIndexOf Reverse Sort
- ⎕NL -9
- Array DateTime
```
Another use for `⎕NL` is to examine .NET *enumerations*. For example:
@@ -106,14 +81,6 @@ Fixed3D FixedDialog FixedSingle FixedToolWindow None Sizable SizableToolWi
FormBorderStyle.FixedDialog.value__
3
- FormBorderStyle.({⍵,[1.5]⍎¨⍵,¨⊂'.value__'}⎕NL -2)
- Fixed3D 2
- FixedDialog 3
- FixedSingle 1
- FixedToolWindow 5
- None 0
- Sizable 4
- SizableToolWindow 6
```
### COM Objects
@@ -129,8 +96,6 @@ Once a reference to a COM object has been obtained, `⎕NL` may be used to obtai
xl.⎕NL -3 ⍝ Methods
_Evaluate _FindFile _Run2 _Wait _WSFunction ActivateMicrosoftApp AddChartAutoFormat AddCustomList Browse Calculate ...
- ⎕NL -9
- xl
```
diff --git a/language-reference-guide/docs/system-functions/nl-monadic.md b/language-reference-guide/docs/system-functions/nl-monadic.md
new file mode 100644
index 00000000000..a105329c375
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/nl-monadic.md
@@ -0,0 +1,105 @@
+---
+search:
+ boost: 2
+---
+
+# List Object Names `R←⎕NL Y`{{key}}
+
+`Y` must be a simple numeric scalar or vector containing one or more of the values for name-class. See also [Name Classification](nc.md).
+
+To restrict the result to names beginning with particular characters, use [dyadic `⎕NL`](nl-dyadic.md).
+
+`R` is a list of the names of active objects whose name-class is included in `Y` in standard sorted order.
+
+If *any* element of `Y` is negative, positive values in `Y` are treated as if they were negative, and R is a vector of character vectors. Otherwise, `R` is simple character matrix.
+
+Furthermore, if `⎕NL` is being evaluated inside the namespace associated with a Class or an Instance of a Class, and any element of `Y` is negative, `R` includes the Public names exposed by the Base Class (if any) and all other Classes in the Class hierarchy.
+
+Standard sorted order is in Unicode point order for Unicode editions, and in the collation order of `⎕AV` for Classic editions.
+
+If an element of `Y` is an integer, the names of all of the corresponding sub-name-classes are included in `R`. For example, if `Y` contains the value 2, the names of all variables (name-class 2.1), fields (2.2), properties (2.3) and external or shared variables (2.6) are obtained. Otherwise, only the names of members of the corresponding sub-name-class are obtained.
+
+Examples
+```apl
+
+ ⎕NL 2 3
+A
+FAST
+FIND
+FOO
+V
+
+ ⎕NL ¯9
+ Animal Bird BirdBehaviour Coin Cylinder DomesticParrot Eeyore FishBehaviour Nickel Parrot Penguin Polly Robin
+ ⎕NL ¯9.3 ⍝ Instances
+ Eeyore Nickel Polly Robin
+ ⎕NL ¯9.4 ⍝ Classes
+ Animal Bird Coin Cylinder DomesticParrot Parrot Penguin
+ ⎕NL ¯9.5 ⍝ Interfaces
+ BirdBehaviour FishBehaviour
+```
+
+`⎕NL` can also be used to explore Dyalog GUI Objects, .NET types and COM objects.
+
+### Dyalog GUI Objects
+
+`⎕NL` may be used to obtain lists of the Methods, Properties and Events provided by Dyalog APL GUI Objects.
+
+### .NET Classes (Types)
+
+`⎕NL` can be used to explore .NET types.
+
+When a reference is made to an undefined name, and `⎕USING` is set, APL attempts to load the Type from the appropriate .NET Assemblies. If successful, the name is entered into the symbol table with name-class 9.6.
+```apl
+
+ ⎕USING←'System'
+ DateTime
+(System.DateTime)
+ ⎕NL -9
+ DateTime
+ ⎕NC,⊂'DateTime'
+9.6
+```
+
+The names of the Properties and Methods of a .NET Type may then be obtained using `⎕NL`.
+
+In fact it is not necessary to make a separate reference first, because the expression `Type.⎕NL` (where `Type` is a .NET Type) is itself a reference to Type. So, (with `⎕USING` still set to `'System'`):
+```apl
+
+ ⎕NL -9
+ Array DateTime
+```
+
+Another use for `⎕NL` is to examine .NET *enumerations*. For example:
+```apl
+
+ ⎕USING←'System.Windows.Forms,system.windows.forms.dll'
+
+ FormBorderStyle.FixedDialog.value__
+3
+
+ FormBorderStyle.({⍵,[1.5]⍎¨⍵,¨⊂'.value__'}⎕NL -2)
+ Fixed3D 2
+ FixedDialog 3
+ FixedSingle 1
+ FixedToolWindow 5
+ None 0
+ Sizable 4
+ SizableToolWindow 6
+```
+
+### COM Objects
+
+Once a reference to a COM object has been obtained, `⎕NL` may be used to obtain lists of its Methods, Properties and Events.
+```apl
+
+ xl←⎕NEW'OLEClient'(⊂'ClassName' 'Excel.Application')
+
+ ⎕NL -9
+ xl
+```
+
+
+
+ ⎕NL NL
+
diff --git a/language-reference-guide/docs/system-functions/nmove.md b/language-reference-guide/docs/system-functions/nmove.md
index e912c5adb8f..7101b727722 100644
--- a/language-reference-guide/docs/system-functions/nmove.md
+++ b/language-reference-guide/docs/system-functions/nmove.md
@@ -27,7 +27,7 @@ The shy result `R` contains count(s) of top-level items moved. If `Y` is a singl
|---|---|
|0 { .shaded } |The name or names in `Y` identifies a specific file name.|
-|`1`|The name or names in `Y` that specify the *base name* and *extension* (see [NParts](./nparts.md) ), may also contain the wildcard characters "?" and "*". An asterisk is a substitute for any 0 or more characters in a file name or extension; a question-mark is a substitute for any single character.|
+|`1`|The name or names in `Y` that specify the *base name* and *extension* (see [NParts](./nparts-monadic.md) ), may also contain the wildcard characters "?" and "*". An asterisk is a substitute for any 0 or more characters in a file name or extension; a question-mark is a substitute for any single character.|
Note that when **Wildcard** is 1, element(s) of `R` can be 0 or `>1`. If **Wildcard** is 0, elements of `R` are always 1.
diff --git a/language-reference-guide/docs/system-functions/nparts-disambiguation.md b/language-reference-guide/docs/system-functions/nparts-disambiguation.md
new file mode 100644
index 00000000000..5abdd874926
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/nparts-disambiguation.md
@@ -0,0 +1,22 @@
+---
+search:
+ exclude: true
+---
+
+# File Name Parts `⎕NPARTS`
+
+## Monadic `⎕NPARTS` means
+
+[File Name Parts](nparts-monadic.md)
+```apl
+ ⎕NPARTS '/usr/lib/file.txt'
+ /usr/lib/ file .txt
+```
+
+## Dyadic `⎕NPARTS` means
+
+[Normalised File Name Parts](nparts-dyadic.md)
+```apl
+ 1 ⎕NPARTS'c:/tmp\foo.txt'
+ c:/tmp/ foo .txt
+```
diff --git a/language-reference-guide/docs/system-functions/nparts.md b/language-reference-guide/docs/system-functions/nparts-dyadic.md
similarity index 90%
rename from language-reference-guide/docs/system-functions/nparts.md
rename to language-reference-guide/docs/system-functions/nparts-dyadic.md
index 64c59c7d00d..b41543a7e33 100644
--- a/language-reference-guide/docs/system-functions/nparts.md
+++ b/language-reference-guide/docs/system-functions/nparts-dyadic.md
@@ -3,15 +3,17 @@ search:
boost: 2
---
-# File Name Parts `R←{X} ⎕NPARTS Y`{{key}}
+# Normalised File Name Parts `R←X ⎕NPARTS Y`{{key}}
Splits a file or directory name into its constituent parts.
+To split the names exactly as given, use [monadic `⎕NPARTS`](nparts-monadic.md).
+
`Y` is a character vector or scalar containing a single name, or a vector of character vectors containing zero or more names. Names must conform to the file-naming rules of the host Operating System.
The file(s) need not exist; indeed this system function makes no attempt to identify or locate it/them.
-The optional left-argument `X` specifies whether or not the name or names specified by `Y` are *normalised* before being processed. The default value 0 means no normalisation; 1 means normalise as follows:
+The left-argument `X` specifies whether or not the name or names specified by `Y` are *normalised* before being processed. The default value 0 means no normalisation; 1 means normalise as follows:
- Pathnames are made absolute.
- On Windows, all "\" directory separators are changed to "/".
diff --git a/language-reference-guide/docs/system-functions/nparts-monadic.md b/language-reference-guide/docs/system-functions/nparts-monadic.md
new file mode 100644
index 00000000000..58926032c17
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/nparts-monadic.md
@@ -0,0 +1,38 @@
+---
+search:
+ boost: 2
+---
+
+# File Name Parts `R←⎕NPARTS Y`{{key}}
+
+Splits a file or directory name into its constituent parts.
+
+To normalise the names before splitting them, use [dyadic `⎕NPARTS`](nparts-dyadic.md).
+
+`Y` is a character vector or scalar containing a single name, or a vector of character vectors containing zero or more names. Names must conform to the file-naming rules of the host Operating System.
+
+The file(s) need not exist; indeed this system function makes no attempt to identify or locate it/them.
+
+If `Y` is a scalar or vector, the result `R` is a 3-element vector of character vectors as follows:
+
+|-----|-----------|
+|`[1]`|*path* |
+|`[2]`|*base name*|
+|`[3]`|*extension*|
+
+The *path* identifies the directory in which the file exists.
+
+The *base name* is the name of the file stripped of its path and extension, if any.
+
+The *extension* is the file extension including the leading ".".
+
+If `Y` is a vector of character vectors, `R` is a vector of 3-element character vectors and is the same length as `Y`.
+
+Examples
+
+Note that `⊃1 ⎕NPARTS ''` returns the current working directory.
+
+
+
+ ⎕NPARTS NPARTS
+
diff --git a/language-reference-guide/docs/system-functions/nput.md b/language-reference-guide/docs/system-functions/nput.md
index 9f055d7255f..bff7008a60c 100644
--- a/language-reference-guide/docs/system-functions/nput.md
+++ b/language-reference-guide/docs/system-functions/nput.md
@@ -5,7 +5,7 @@ search:
# Write Text File `{R}←X ⎕NPUT Y`{{key}}
-This function writes character data to a text file. See also [Read Text File](nget.md).
+This function writes character data to a text file. See also [Read Text File](nget-monadic.md).
`Y` is either a simple character vector or scalar containing the name of the file to be written, or a 2-item vector whose first item is the file name and whose second is an integer scalar specifying `flags` for the operation.
@@ -23,7 +23,7 @@ The left-argument `X` is comprised of 1, 2 or 3 items which identify `(content)
If specified, `encoding` is either:
-- a character vector from the first column in the table [File Encodings](nget.md). If `encoding` specifies a UTF format, it may be qualified with -BOM (for example, UTF-8-BOM), which causes a Byte Order Mark (BOM) to be written at the beginning of the file or -NOBOM which does not. If the -BOM or -NOBOM suffix is omitted, UTF-8 defaults to UTF-8-NOBOM, while the other UTF formats default to -BOM.
+- a character vector from the first column in the table [File Encodings](nget-dyadic.md). If `encoding` specifies a UTF format, it may be qualified with -BOM (for example, UTF-8-BOM), which causes a Byte Order Mark (BOM) to be written at the beginning of the file or -NOBOM which does not. If the -BOM or -NOBOM suffix is omitted, UTF-8 defaults to UTF-8-NOBOM, while the other UTF formats default to -BOM.
- a 256-element numeric vector that maps each possible byte value (0-255) to a Unicode code point (1st element = Unicode code point corresponding to byte value 0, and so on). ¯1 indicates that the corresponding byte value is not mapped to any character. Apart from ¯1, no value may appear in the table more than once.
If omitted, `encoding` defaults to UTF-8-NOBOM.
@@ -33,7 +33,7 @@ Note: If a non-empty file is appended to:
- No BOM will be written, even if encoding specifies it.
- No check is made that the existing file content is text in the same encoding format.
-If specified, `newline` is numeric and is either `⍬` or a scalar or vector from the column labelled *Value* in the **newline characters** section of the table [Line separators:](nget.md). Any other value causes `DOMAIN ERROR`. If `newline` is omitted it defaults to `(13 10)` on Windows and `10` on other platforms.
+If specified, `newline` is numeric and is either `⍬` or a scalar or vector from the column labelled *Value* in the **newline characters** section of the table [Line separators:](nget-monadic.md). Any other value causes `DOMAIN ERROR`. If `newline` is omitted it defaults to `(13 10)` on Windows and `10` on other platforms.
In all cases, `newline` is appended if required to a simple vector or to each vector in a vector of vectors.
diff --git a/language-reference-guide/docs/system-functions/nq-disambiguation.md b/language-reference-guide/docs/system-functions/nq-disambiguation.md
new file mode 100644
index 00000000000..cf63c37bc7b
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/nq-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Enqueue Event `⎕NQ`
+
+## Monadic `⎕NQ` means
+
+[Enqueue Event](nq-monadic.md)
+
+## Dyadic `⎕NQ` means
+
+[Custom Enqueue Event](nq-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/nq.md b/language-reference-guide/docs/system-functions/nq-dyadic.md
similarity index 90%
rename from language-reference-guide/docs/system-functions/nq.md
rename to language-reference-guide/docs/system-functions/nq-dyadic.md
index df898ef6d11..47a0b178f1b 100644
--- a/language-reference-guide/docs/system-functions/nq.md
+++ b/language-reference-guide/docs/system-functions/nq-dyadic.md
@@ -3,15 +3,17 @@ search:
boost: 2
---
-# Enqueue Event `{R}←{X}⎕NQ Y`{{key}}
+# Custom Enqueue Event `{R}←X ⎕NQ Y`{{key}}
**Windows only.**
This system function generates an event or invokes a method.
+To enqueue an event with the default handling, use [monadic `⎕NQ`](nq-monadic.md).
+
While APL is executing, events occur "naturally" as a result of user action or of communication with other applications. These events are added to the event queue as and when they occur, and are subsequently removed and processed one by one by `⎕DQ`. `⎕NQ` provides an "artificial" means to generate an event and is analogous to `⎕SIGNAL`.
-If the left argument `X` is omitted or is 0, `⎕NQ` adds the event specified by `Y` to the bottom of the event queue. The event will subsequently be processed by `⎕DQ` when it reaches the top of the queue.
+If `X` is 0, `⎕NQ` adds the event specified by `Y` to the bottom of the event queue. The event will subsequently be processed by `⎕DQ` when it reaches the top of the queue.
If `X` is 1, the event is actioned **immediately** by `⎕NQ` itself and is processed in exactly the same way as it would be processed by `⎕DQ`. For example, if the event has a callback function attached, `⎕NQ` will invoke it directly. See [Dequeue Events](dq.md) for further details. If the event generates any subsidiary events (for example, a KeyPress might generate a GotFocus), the subsidiary events are added to the event queue rather than being executed immediately.
@@ -44,14 +46,8 @@ If the left argument is 2, `⎕NQ` returns either the value 1 or a value that is
Examples
```apl
⍝ Send a keystroke ("A") to an Edit Field
- ⎕NQ TEST.ED 'KeyPress' 'A'
-
⍝ Iconify all top-level Forms
- {⎕NQ ⍵ 'StateChange' 1}¨'Form'⎕WN'.'
-
⍝ Set the focus to a particular field
- ⎕NQ TEST.ED3 40
-
⍝ Throw a new page on a printer
1 ⎕NQ PR1 'NewPage'
@@ -61,8 +57,6 @@ If the left argument is 2, `⎕NQ` returns either the value 1 or a value that is
...
⎕DQ 'TEST'
...
- ⎕NQ TEST 1001 ⍝ From a callback
-
⍝ Call GetItemState method for a TreeView F.TV
+2 ⎕NQ F.TV 'GetItemState' 6
96
diff --git a/language-reference-guide/docs/system-functions/nq-monadic.md b/language-reference-guide/docs/system-functions/nq-monadic.md
new file mode 100644
index 00000000000..d6febfe7a10
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/nq-monadic.md
@@ -0,0 +1,61 @@
+---
+search:
+ boost: 2
+---
+
+# Enqueue Event `{R}←⎕NQ Y`{{key}}
+
+**Windows only.**
+
+This system function generates an event or invokes a method.
+
+To choose how the event is queued and what is returned, use [dyadic `⎕NQ`](nq-dyadic.md).
+
+While APL is executing, events occur "naturally" as a result of user action or of communication with other applications. These events are added to the event queue as and when they occur, and are subsequently removed and processed one by one by `⎕DQ`. `⎕NQ` provides an "artificial" means to generate an event and is analogous to `⎕SIGNAL`.
+
+`⎕NQ` adds the event specified by `Y` to the bottom of the event queue. The event will subsequently be processed by `⎕DQ` when it reaches the top of the queue.
+
+`Y` is a nested vector containing an event message. The first two elements of `Y` are:
+
+|-----|------|---------------------------------------------------------------------|
+|`[1]`|Object|ref or character vector |
+|`[2]`|Event |numeric scalar or character vector which specifies an event or method|
+
+`Y[1]` must specify an *existing* object. If not, `⎕NQ` terminates with a `VALUE ERROR`.
+
+If `Y[2]` specifies a standard event type, subsequent elements must conform to the structure defined for that event type. If not, `⎕NQ` terminates with a `SYNTAX ERROR`. If additional elements (beyond those defined for the event type) are supplied this will not cause an error, but is not recommended because Dyalog may extend the event message in the future.
+
+If `Y[2]` specifies a non-standard event type, `Y[3]` onwards (if present) may contain arbitrary information. Although any event type not listed herein may be used, numbers in the range 0-1000 are reserved for future extensions.
+
+If `⎕NQ` is used monadically, or with a left argument of 0, its (shy) result is always an empty character vector. If a left argument of 1 is specified, `⎕NQ` returns `Y` unchanged or a modified `Y` if the callback function returns its modified argument as a result.
+
+If the left argument is 2, `⎕NQ` returns either the value 1 or a value that is appropriate.
+
+Examples
+```apl
+ ⍝ Send a keystroke ("A") to an Edit Field
+ ⎕NQ TEST.ED 'KeyPress' 'A'
+
+ ⍝ Iconify all top-level Forms
+ {⎕NQ ⍵ 'StateChange' 1}¨'Form'⎕WN'.'
+
+ ⍝ Set the focus to a particular field
+ ⎕NQ TEST.ED3 40
+
+ ⍝ Throw a new page on a printer
+ ⍝ Terminate ⎕DQ under program control
+
+ 'TEST'⎕WC 'Form' ... ('Event' 1001 1)
+ ...
+ ⎕DQ 'TEST'
+ ...
+ ⎕NQ TEST 1001 ⍝ From a callback
+
+ ⍝ Call GetItemState method for a TreeView F.TV
+ ⍝ Report where APL is installed
+```
+
+
+
+ ⎕NQ NQ
+
diff --git a/language-reference-guide/docs/system-functions/nread.md b/language-reference-guide/docs/system-functions/nread.md
index 42c92ed8745..db9c4ae5221 100644
--- a/language-reference-guide/docs/system-functions/nread.md
+++ b/language-reference-guide/docs/system-functions/nread.md
@@ -40,7 +40,7 @@ Table: Unicode Edition: Conversion Codes
|1289 |16 `×` count |128 bits complex |count |
!!! Legacy "Legacy"
- Conversion code 82 is permitted in the Unicode edition for backwards compatibility purposes and causes 1-byte data on file to be translated (according to [⎕NXLATE](./nxlate.md)) from [⎕AV](./av.md) indices into normal (Unicode) characters of type 80, 160 or 320.
+ Conversion code 82 is permitted in the Unicode edition for backwards compatibility purposes and causes 1-byte data on file to be translated (according to [⎕NXLATE](./nxlate-monadic.md)) from [⎕AV](./av.md) indices into normal (Unicode) characters of type 80, 160 or 320.
Table: Classic Edition: Conversion Codes
diff --git a/language-reference-guide/docs/system-functions/ns-disambiguation.md b/language-reference-guide/docs/system-functions/ns-disambiguation.md
new file mode 100644
index 00000000000..5157f3282e5
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/ns-disambiguation.md
@@ -0,0 +1,22 @@
+---
+search:
+ exclude: true
+---
+
+# Namespace `⎕NS`
+
+## Monadic `⎕NS` means
+
+[Create/Clone Namespace](ns-monadic.md)
+```apl
+ ⎕NS ''
+#.[Namespace]
+```
+
+## Dyadic `⎕NS` means
+
+[Create/Clone Custom Namespaces](ns-dyadic.md)
+```apl
+ 'myns' ⎕NS ''
+#.myns
+```
diff --git a/language-reference-guide/docs/system-functions/ns.md b/language-reference-guide/docs/system-functions/ns-dyadic.md
similarity index 90%
rename from language-reference-guide/docs/system-functions/ns.md
rename to language-reference-guide/docs/system-functions/ns-dyadic.md
index 35f021573f0..74ca83a78fd 100644
--- a/language-reference-guide/docs/system-functions/ns.md
+++ b/language-reference-guide/docs/system-functions/ns-dyadic.md
@@ -3,16 +3,18 @@ search:
boost: 2
---
-# Namespace `{R}←{X}⎕NS Y`{{key}}
+# Create/Clone Custom Namespaces `{R}←X ⎕NS Y`{{key}}
The `⎕NS` system function makes it possible to create namespaces, copy elements from one namespace to another, and clone namespaces.
+To create or clone a namespace in the current space, use [monadic `⎕NS`](ns-monadic.md).
+
`Y` is one of the following:
* an vector of zero or more objects to be copied.
* an array containing references to, and/or [`⎕OR`](or.md)s of, one or more namespaces.
-If specified, `X` must be an array that identifies one or more namespaces. This means `X` must be one of:
+`X` must be an array that identifies one or more namespaces. This means `X` must be one of:
* a simple character scalar or vector identifying the name of a namespace.
* a reference to a namespace.
@@ -42,7 +44,7 @@ The treatment of `X` varies:
The objects identified in the list `Y` are copied into the namespace `X`.
-If `X` is specified, the result `R` is the full name (starting with `#.` or `⎕SE.`) of the namespace `X`. If `X` is omitted, the result `R` is a namespace reference to an unnamed namespace.
+The result `R` is the full name (starting with `#.` or `⎕SE.`) of the namespace `X`.
Examples
@@ -69,13 +71,6 @@ If `X` is specified, the result `R` is the full name (starting with `#.` or `⎕
```
```apl
- NONAME←⎕NS '' ⍝ Create unnamed namespace
- NONAME
-#.[Namespace]
-```
-
-```apl
- DATA←⎕NS¨3⍴⊂'' ⍝ Create 3-element vector of
⍝ distinct unnamed nspaces
DATA
#.[Namespace] #.[Namespace] #.[Namespace]
@@ -100,12 +95,10 @@ If `Y` does not contain a reference to, or a `⎕OR` of, a *GUI* object, the res
Examples
```apl
- original←⎕NS⍬
original.(A B C)←1 2 3
'new' ⎕NS ⎕OR'original' ⍝ cloning a namespace from ⎕OR
new.A
1
- cloned←⎕NS original ⍝ cloning a namespace from reference
cloned.D←4
original.⎕NL ¯2
diff --git a/language-reference-guide/docs/system-functions/ns-monadic.md b/language-reference-guide/docs/system-functions/ns-monadic.md
new file mode 100644
index 00000000000..7d1f7659012
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/ns-monadic.md
@@ -0,0 +1,80 @@
+---
+search:
+ boost: 2
+---
+
+# Create/Clone Namespace `{R}←⎕NS Y`{{key}}
+
+The `⎕NS` system function makes it possible to create namespaces, copy elements from one namespace to another, and clone namespaces.
+
+To create or clone namespaces at one or more identified locations, use [dyadic `⎕NS`](ns-dyadic.md).
+
+`Y` is one of the following:
+
+* an vector of zero or more objects to be copied.
+* an array containing references to, and/or [`⎕OR`](or.md)s of, one or more namespaces.
+
+The result `R` is shy when the system function is invoked dyadically, otherwise its contents are determined by the value of `Y`.
+
+## Usage
+
+`⎕NS` is used to create or populate one or more namespaces based on either a list of members to be copied into the target namespace(s), or a list of objects to be merged into the target namespace(s).
+
+### Case 1: Create or Populate Namespace from Member List
+
+`Y` must be a simple character scalar, vector, matrix, or a nested vector of character vectors identifying zero or more workspace objects to be copied into the new namespace. The identifiers in `Y` can be simple names or compound names separated by `'.'` and including the names of the special namespaces `'#'`, `'##'` and `'⎕SE'`.
+
+The objects identified in the list `Y` are copied into the new namespace.
+
+The result `R` is a namespace reference to an unnamed namespace.
+
+Examples
+
+```apl
+ NONAME←⎕NS '' ⍝ Create unnamed namespace
+ NONAME
+#.[Namespace]
+```
+
+```apl
+ DATA←⎕NS¨3⍴⊂'' ⍝ Create 3-element vector of
+ ⍝ distinct unnamed nspaces
+ DATA
+ #.[Namespace] #.[Namespace] #.[Namespace]
+ one.⎕NL ¯2
+ DATA
+```
+
+## Case 2: Create or Populate Namespace from Object List
+
+`Y` is one or more references to, or `⎕OR`s of, namespaces.
+
+A new namespace is created as a complete copy (clone) of the original namespace represented by `Y`.
+
+`Y` can also be a vector of namespaces, in which case each item of `Y` is processed as explained above, in ravel order. The effect is that the contents of all the namespaces are merged into the target namespace.
+
+Examples
+
+```apl
+ original←⎕NS⍬
+ original.(A B C)←1 2 3
+ new.A
+1
+ cloned←⎕NS original ⍝ cloning a namespace from reference
+ cloned.D←4
+
+ original.⎕NL ¯2
+ A B C
+ cloned.⎕NL ¯2
+ A B C D
+```
+
+### Variant Option: Trigger
+
+The `Trigger` variant option specifies whether any [triggers](../../../programming-reference-guide/triggers/triggers) should be run for the modified variables in the target namespace that have triggers attached.
+The value must be a Boolean scalar. The default is 0, meaning that triggers are not run.
+
+
+
+ ⎕NS NS
+
diff --git a/language-reference-guide/docs/system-functions/nxlate-disambiguation.md b/language-reference-guide/docs/system-functions/nxlate-disambiguation.md
new file mode 100644
index 00000000000..b182a23d27e
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/nxlate-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Native File Translate `⎕NXLATE`
+
+## Monadic `⎕NXLATE` means
+
+[Query Native File Translation Vector](nxlate-monadic.md)
+
+## Dyadic `⎕NXLATE` means
+
+[Set Native File Translation Vector](nxlate-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/nxlate.md b/language-reference-guide/docs/system-functions/nxlate-dyadic.md
similarity index 78%
rename from language-reference-guide/docs/system-functions/nxlate.md
rename to language-reference-guide/docs/system-functions/nxlate-dyadic.md
index 74eae12bdf6..a55933fd6cb 100644
--- a/language-reference-guide/docs/system-functions/nxlate.md
+++ b/language-reference-guide/docs/system-functions/nxlate-dyadic.md
@@ -3,17 +3,19 @@ search:
boost: 2
---
-# Native File Translate `{R}←{X}⎕NXLATE Y`{{key}}
+# Set Native File Translation Vector `{R}←X ⎕NXLATE Y`{{key}}
This associates a character translation vector with a native file or, if `Y` is 0, with the use by `⎕DR`.
+To query the current translation vector, use [monadic `⎕NXLATE`](nxlate-monadic.md).
+
A translate vector is a 256-element vector of integers from 0-255. Each element maps the corresponding `⎕AV` position onto an ANSI character code.
For example, to map `⎕AV[17+⎕IO]` onto ANSI 'a' (code 97), element 17 of the translate vector is set to 97.
`⎕NXLATE` is a non-Unicode (Classic Edition) feature and is retained in the Unicode Edition only for compatibility.
-`Y` is either a negative integer tie number associated with a tied native file or 0. If `Y` is negative, monadic `⎕NXLATE` returns the current translation vector associated with the corresponding native file. If specified, the left argument `X` is a 256-element vector of integers that specifies a new translate vector. In this case, the old translate vector is returned as a shy result. If `Y` is 0, it refers to the translate vector used by `⎕DR` to convert to and from character data.
+`Y` is either a negative integer tie number associated with a tied native file or 0. The left argument `X` is a 256-element vector of integers that specifies a new translate vector for the corresponding native file; the old translate vector is returned as a shy result. If `Y` is 0, it refers to the translate vector used by `⎕DR` to convert to and from character data.
The system treats a translate vector with value `(⍳256)-⎕IO` as meaning *no translation* and thus provides raw input/output bypassing the whole translation process.
diff --git a/language-reference-guide/docs/system-functions/nxlate-monadic.md b/language-reference-guide/docs/system-functions/nxlate-monadic.md
new file mode 100644
index 00000000000..f4a7ec78902
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/nxlate-monadic.md
@@ -0,0 +1,33 @@
+---
+search:
+ boost: 2
+---
+
+# Query Native File Translation Vector `{R}←⎕NXLATE Y`{{key}}
+
+This associates a character translation vector with a native file or, if `Y` is 0, with the use by `⎕DR`.
+
+To set the translation vector, use [dyadic `⎕NXLATE`](nxlate-dyadic.md).
+
+A translate vector is a 256-element vector of integers from 0-255. Each element maps the corresponding `⎕AV` position onto an ANSI character code.
+
+For example, to map `⎕AV[17+⎕IO]` onto ANSI 'a' (code 97), element 17 of the translate vector is set to 97.
+
+`⎕NXLATE` is a non-Unicode (Classic Edition) feature and is retained in the Unicode Edition only for compatibility.
+
+`Y` is either a negative integer tie number associated with a tied native file or 0. If `Y` is negative, `⎕NXLATE` returns the current translation vector associated with the corresponding native file. If `Y` is 0, it refers to the translate vector used by `⎕DR` to convert to and from character data.
+
+The system treats a translate vector with value `(⍳256)-⎕IO` as meaning *no translation* and thus provides raw input/output bypassing the whole translation process.
+
+The default translation vector established at `⎕NTIE` or `⎕NCREATE` time is derived from the mapping defined in the current output translation table (normally WIN.DOT) and maps alphabetic, numeric and most other characters in `⎕AV` to their corresponding ANSI positions. However, some characters are not resolved by this process and it is recommended that users define translate vectors to cover all cases.
+
+## Unicode Edition
+
+`⎕NXLATE` is relevant in the Unicode Edition only to process Native Files that contain characters expressed as indices into `⎕AV`, such as files written by the Classic Edition.
+
+In the Unicode Edition, when reading data from a Native File using conversion code 82, incoming bytes are translated first to `⎕AV` indices using the translation table specified by `⎕NXLATE`, and then to type 80, 160 or 320 using `⎕AVU`. When writing data to a Native File using conversion code 82, characters are converted using these two translation tables in reverse.
+
+
+
+ ⎕NXLATE NXLATE
+
diff --git a/language-reference-guide/docs/system-functions/path.md b/language-reference-guide/docs/system-functions/path.md
index 51b364ab26f..500d20b8d0e 100644
--- a/language-reference-guide/docs/system-functions/path.md
+++ b/language-reference-guide/docs/system-functions/path.md
@@ -7,7 +7,7 @@ search:
`⎕PATH` is a simple character vector representing a blank-separated list of namespaces. It is approximately analogous to the PATH variable in Windows or UNIX.
-The `⎕PATH` variable can be used to identify a namespace in which commonly used utility functions reside. Functions or operators (**NOT** variables) which are copied into this namespace and *exported* (see [Export Object](export.md)) can then be used directly from anywhere in the workspace without giving their full path names. `⎕PATH` has Session scope.
+The `⎕PATH` variable can be used to identify a namespace in which commonly used utility functions reside. Functions or operators (**NOT** variables) which are copied into this namespace and *exported* (see [Export Object](export-dyadic.md)) can then be used directly from anywhere in the workspace without giving their full path names. `⎕PATH` has Session scope.
Example
@@ -22,7 +22,7 @@ To make the `DISPLAY` function available directly from within any namespace.
In detail, `⎕PATH` works as follows:
-When a reference to a name cannot be found in the current namespace, the system searches for it from left to right in the list of namespaces indicated by `⎕PATH`. In each namespace, if the name references a defined function (or operator) *and* the export type of that function is non-zero (see [Export Object](export.md) ), then it is used to satisfy the reference. If the search exhausts all the namespaces in `⎕PATH` without finding a qualifying reference, the system issues a `VALUE ERROR` in the normal manner.
+When a reference to a name cannot be found in the current namespace, the system searches for it from left to right in the list of namespaces indicated by `⎕PATH`. In each namespace, if the name references a defined function (or operator) *and* the export type of that function is non-zero (see [Export Object](export-dyadic.md) ), then it is used to satisfy the reference. If the search exhausts all the namespaces in `⎕PATH` without finding a qualifying reference, the system issues a `VALUE ERROR` in the normal manner.
The special character `↑` stands for the list of namespace ancestors:
```apl
diff --git a/language-reference-guide/docs/system-functions/pfkey-disambiguation.md b/language-reference-guide/docs/system-functions/pfkey-disambiguation.md
new file mode 100644
index 00000000000..128048db385
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/pfkey-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Program Function Key `⎕PFKEY`
+
+## Monadic `⎕PFKEY` means
+
+[Query Programmable Function Key](pfkey-monadic.md)
+
+## Dyadic `⎕PFKEY` means
+
+[Program Function Key](pfkey-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/pfkey.md b/language-reference-guide/docs/system-functions/pfkey-dyadic.md
similarity index 83%
rename from language-reference-guide/docs/system-functions/pfkey.md
rename to language-reference-guide/docs/system-functions/pfkey-dyadic.md
index caf1305ea81..49f5b11dc87 100644
--- a/language-reference-guide/docs/system-functions/pfkey.md
+++ b/language-reference-guide/docs/system-functions/pfkey-dyadic.md
@@ -3,15 +3,17 @@ search:
boost: 2
---
-# Program Function Key `R←{X}⎕PFKEY Y`{{key}}
+# Program Function Key `R←X ⎕PFKEY Y`{{key}}
`⎕PFKEY` is a system function that sets or queries the programmable function keys. `⎕PFKEY` associates a sequence of keystrokes with a function key. When the user subsequently presses the key, it is as if he had typed the associated keystrokes one by one.
+To query the current setting of a programmable function key, use [monadic `⎕PFKEY`](pfkey-monadic.md).
+
Note that Ride does not currently support the use of `⎕PFKEY`; it is possible however to associate simple strings to function keys - see the [Ride User Guide](https://dyalog.github.io/ride) for more information.
-`Y` is an integer scalar in the range 0-255 specifying a programmable function key. If `X` is omitted the result `R` is the current setting of the key. If the key has not been defined previously, the result is an empty character vector.
+`Y` is an integer scalar in the range 0-255 specifying a programmable function key. If the key has not been defined previously, the result is an empty character vector.
-If `X` is specified it is a simple or nested character vector defining the new setting of the key. The value of `X` is returned in the result `R`.
+`X` is a simple or nested character vector defining the new setting of the key. The value of `X` is returned in the result `R`.
The elements of `X` are either character scalars or 2-element character vectors which specify keycodes. See [Keyboard Shortcuts](../../../windows-ui-guide/keyboard-shortcuts).
diff --git a/language-reference-guide/docs/system-functions/pfkey-monadic.md b/language-reference-guide/docs/system-functions/pfkey-monadic.md
new file mode 100644
index 00000000000..0b9ed6d88f1
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/pfkey-monadic.md
@@ -0,0 +1,25 @@
+---
+search:
+ boost: 2
+---
+
+# Query Programmable Function Key `R←⎕PFKEY Y`{{key}}
+
+`⎕PFKEY` is a system function that sets or queries the programmable function keys. `⎕PFKEY` associates a sequence of keystrokes with a function key. When the user subsequently presses the key, it is as if he had typed the associated keystrokes one by one.
+
+To set a programmable function key, use [dyadic `⎕PFKEY`](pfkey-dyadic.md).
+
+Note that Ride does not currently support the use of `⎕PFKEY`; it is possible however to associate simple strings to function keys - see the [Ride User Guide](https://dyalog.github.io/ride) for more information.
+
+`Y` is an integer scalar in the range 0-255 specifying a programmable function key. The result `R` is the current setting of the key. If the key has not been defined previously, the result is an empty character vector.
+
+Programmable function keys are recognised in any of the three types of window (SESSION, EDIT and TRACE) provided by the Dyalog APL development environment. `⎕SR` operates with the 'raw' function keys and ignores programmed settings.
+
+Note that key definitions can reference other function keys, such as "F1" or "F123".
+
+The size of the buffer associated with `⎕PFKEY` is specified by the *pfkey_size* parameter.
+
+
+
+ ⎕PFKEY PFKEY
+
diff --git a/language-reference-guide/docs/system-functions/profile-disambiguation.md b/language-reference-guide/docs/system-functions/profile-disambiguation.md
new file mode 100644
index 00000000000..1dc499d0941
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/profile-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Profile Application `⎕PROFILE`
+
+## Monadic `⎕PROFILE` means
+
+[Profile Code](profile-monadic.md)
+
+## Dyadic `⎕PROFILE` means
+
+[Filter Profile Data](profile-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/profile-dyadic.md b/language-reference-guide/docs/system-functions/profile-dyadic.md
new file mode 100644
index 00000000000..7b8bfcc2181
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/profile-dyadic.md
@@ -0,0 +1,184 @@
+---
+search:
+ boost: 2
+---
+
+# Filter Profile Data `{R}←X ⎕PROFILE Y`{{key}}
+
+`⎕PROFILE` facilitates the profiling of CPU consumption, code coverage, or elapsed time for a workspace. It does so by retaining time measurements collected for APL functions/operators and function/operator lines. `⎕PROFILE` is used to both control the state of profiling and retrieve the collected profiling data.
+
+To start, stop, or report code profiling, use [monadic `⎕PROFILE`](profile-monadic.md).
+
+`Y` specifies the action to perform and any options for that action, if applicable. `Y` is case-insensitive. The result `R` is, in some cases, shy.
+
+|Syntax |Description |
+|----------------------------------|-------------------------------------------------------------------------------|
+|`{state}←⎕PROFILE 'start' {timer}`|Turn profiling on using the specified timer, or resume if profiling was stopped|
+|`{state}←⎕PROFILE 'stop'` |Suspend the collection of profiling data |
+|`{state}←⎕PROFILE 'clear'` |Turn profiling off, if active, and discard any collected profiling data |
+|`{state}←⎕PROFILE 'calibrate'` |Calibrate the profiling timer |
+|`state←⎕PROFILE 'state'` |Query profiling state |
+|`data←⎕PROFILE 'data'` |Retrieve profiling data in flat form |
+|`data←⎕PROFILE 'tree'` |Retrieve profiling data in tree form |
+
+## Actions
+
+`⎕PROFILE` has two states:
+
+- active – the profiler is running and profiling data is being collected.
+- inactive – the profiler is not running.
+
+For most actions, the result of `⎕PROFILE` is its current state, and comprises:
+
+- `[1]` – Character vector indicating the `⎕PROFILE` state.
+- `[2]` – Character vector indicating the timer being used.
+- `[3]` – Call time bias (in milliseconds), that is, the time that is consumed for the system to take a time measurement.
+- `[4]` – Timer granularity (in milliseconds), that is, the resolution of the timer being used.
+
+### Turn Profiling On
+
+Syntax: `{state} ← ⎕PROFILE 'start' {timer}`
+
+Turns profiling on using the specified timer, or resumes profiling if it was stopped.
+
+`timer` is an optional, case-independent, character vector. Possible values are:
+
+- `'CPU'` (the default)
+- `'elapsed'`
+- `'none'` – `⎕PROFILE` records the number of times each line of code is executed without incurring the timing overhead.
+- `'coverage'` – `⎕PROFILE` identifies which lines of code are executed without incurring the timing or counting overhead.
+
+The first time a particular timer is chosen, `⎕PROFILE` will spend 1,000 milliseconds (1 second) to approximate the call time bias and granularity for that timer.
+
+### Suspend Data Collection
+
+Suspends the collection of profiling data
+
+Syntax: `{state}←⎕PROFILE 'stop'`
+
+### Turn Profiling Off
+
+Syntax: `{state}←⎕PROFILE 'clear'`
+
+Clears any collected profiling data and, if profiling is active, places profiling into an inactive state.
+
+### Calibrate Profiling Timer
+
+Syntax: `{state}←⎕PROFILE 'calibrate'`
+
+Causes `⎕PROFILE` to perform a 1,000 millisecond calibration to approximate the call time bias and granularity for the current timer.
+
+!!! Info "Information"
+ A timer must have been previously selected by using `⎕PROFILE 'start'`, otherwise a `DOMIAN ERROR` is generated.
+
+`⎕PROFILE` will retain the lesser of the current timer values compared to the new values computed by the calibration. This ensures that the smallest possible values of which we can be certain is used.
+
+### Query Profiling State
+
+Syntax: `state←⎕PROFILE 'state'`
+
+Queries and returns the current profiling state.
+
+### Retrieve Data (Flat Form)
+
+Syntax: `data←{X} ⎕PROFILE 'data'`
+
+Retrieves the collected profiling data and returns it in flat form. If the `X` is omitted, the result is a matrix with the following columns:
+
+- `[;1]` – function name
+- `[;2]` – function line number or `⍬` for a whole function entry
+- `[;3]` – number of times the line or function was executed
+- `[;4]` – accumulated time (ms) for this entry exclusive of items called by this entry
+- `[;5]` – accumulated time (ms) for this entry inclusive of items called by this entry
+- `[;6]` – number of times the timer function was called for the exclusive time
+- `[;7]` – number of times the timer function was called for the inclusive time
+
+Example
+`X` must be a simple vector of column indices. The result `R` has the same shape as `X`, and is a vector of the specified column vectors.
+
+```apl
+X ⎕PROFILE 'data' ←→ ↓[⎕IO](⎕PROFILE 'data')[;X]
+```
+
+If `[;2]` is included in the result, then the value `¯1` is used instead of `⍬` to indicate a whole-function entry.
+
+### Retrieve Data (Tree Form)
+
+Syntax: `data←{X} ⎕PROFILE 'tree'`
+
+Retrieves the collected profiling data and returns it in tree form. If the `X` is omitted, the result is a matrix with the following columns:
+
+- `[;1]` – depth level
+- `[;2]` – function name
+- `[;3]` – function line number or `⍬` for a whole function entry
+- `[;4]` – number of times the line or function was executed
+- `[;5]` – accumulated time (ms) for this entry exclusive of items called by this entry
+- `[;6]` – accumulated time (ms) for this entry inclusive of items called by this entry
+- `[;7]` – number of times the timer function was called for the exclusive time
+- `[;8]` – number of times the timer function was called for the inclusive time
+
+Example
+Rows with an even depth level in `[;1]` represent function summary entries; odd depth level rows are function line entries. Recursive functions generate separate rows for each level of recursion.
+
+`X` must be a simple vector of column indices. The result `R` has the same shape as `X`, and is a vector of the specified column vectors.
+
+```apl
+X ⎕PROFILE 'tree' ←→ ↓[⎕IO](⎕PROFILE 'tree')[;X]
+```
+
+## Profile Data Entry Types
+
+The results of `⎕PROFILE 'data'` and `⎕PROFILE 'tree'` have two types of entries; function summary entries and function line entries. Function summary entries contain `⍬` in the line number column, whereas function line entries contain the line number. Line entries for dfns start with 0 as, unlike tradfns, they do not have a header line. The timer data and timer call counts in function summary entries represent the aggregate of the function line entries plus any time spent that cannot be directly attributed to a function line entry. This could include time spent during function initialisation, and so on.
+
+Example
+```apl
+ #.foo 1 1.04406 39347.649450 503 4080803
+ #.foo 1 1 0.12488 0.124887 1 1
+ #.foo 2 100 0.58851 39347.193900 200 4080500
+ #.foo 3 100 0.21340 0.213406 100 100
+```
+
+## Timer Data Persistence
+
+The profiling data collected is stored outside the workspace and will not impact workspace availability. The data is cleared upon workspace load, clear workspace, `⎕PROFILE 'clear'`, or interpreter sign off.
+
+## Using `⎕PROFILE`
+
+!!! Info "Information"
+ Running your application with `⎕PROFILE` turned on incurs a significant processing overhead and will slow dwon your application.
+
+If you choose to use `⎕PROFILE`, the following guidelines and information may be of use to you.
+
+### Selecting a Timer
+
+`⎕PROFILE` supports profiling of either CPU or elapsed time. CPU time is generally of more interest in profiling application performance.
+
+### Simple Profiling
+
+The following procedure should help you to identify any items that take more than 10% of the run time on the top CPU time consumers in an application:
+
+1. Ensure the application runs for a long enough period to collect enough data to overcome the timer granularity. As a guide, the application should run for at least `(4000×4⊃⎕PROFILE 'state')` milliseconds.
+2. Turn profiling on with `⎕PROFILE 'start' 'CPU'`
+3. Run your application.
+4. Pause the profiler with `⎕PROFILE 'stop'`
+5. Examine the profiling data from `⎕PROFILE 'data'` or `⎕PROFILE 'tree'` for entries that consume large amounts of resource.
+
+To identify items that take more than 1% of the run time, or to focus on elapsed time rather than CPU time, take the following additional steps prior to running the profiler:
+
+1. Turn off as much hardware as possible. This would include peripherals, network connections, and so on.
+2. Turn off as many other tasks and processes as possible. These include anti-virus software, firewalls, internet services, and background tasks.
+3. Raise the priority on the Dyalog task to higher than normal (in general, avoid giving it the highest priority).
+4. Run the profiler as described above.
+
+### Advanced Profiling
+
+The timing data collected by `⎕PROFILE` is not adjusted for the timer's call time bias; this means that the times reported by `⎕PROFILE` include the time spent calling the timer function. One effect of this is that "cheap" lines that are called many times appear to consume more resource. If you require more accurate profiling measurements, or if your application takes a short amount of time to run, you might want to adjust for the timer call time bias. To do so, subtract from the timing data the timer's' call time bias multiplied by the number of times the timer was called.
+
+## The `]Profile` User Command
+
+The `]Profile` user command implements a high-level interface to `⎕PROFILE`, and provides reporting and analysis tools that act on the profiling data. For more information, see the [_Application Tuning Guide_](https://docs.dyalog.com/20.0/files/Application_Tuning_Guide.pdf).
+
+
+
+ ⎕PROFILE PROFILE
+
diff --git a/language-reference-guide/docs/system-functions/profile.md b/language-reference-guide/docs/system-functions/profile-monadic.md
similarity index 94%
rename from language-reference-guide/docs/system-functions/profile.md
rename to language-reference-guide/docs/system-functions/profile-monadic.md
index a8f1b2a35f3..c17fa70b686 100644
--- a/language-reference-guide/docs/system-functions/profile.md
+++ b/language-reference-guide/docs/system-functions/profile-monadic.md
@@ -3,10 +3,12 @@ search:
boost: 2
---
-# Profile Application `{R}←{X}⎕PROFILE Y`{{key}}
+# Profile Code `{R}←⎕PROFILE Y`{{key}}
`⎕PROFILE` facilitates the profiling of CPU consumption, code coverage, or elapsed time for a workspace. It does so by retaining time measurements collected for APL functions/operators and function/operator lines. `⎕PROFILE` is used to both control the state of profiling and retrieve the collected profiling data.
+To read only selected columns of the profile data, use [dyadic `⎕PROFILE`](profile-dyadic.md).
+
`Y` specifies the action to perform and any options for that action, if applicable. `Y` is case-insensitive. The result `R` is, in some cases, shy.
|Syntax |Description |
@@ -118,7 +120,7 @@ clear ws
Syntax: `data←{X} ⎕PROFILE 'data'`
-Retrieves the collected profiling data and returns it in flat form. If the `X` is omitted, the result is a matrix with the following columns:
+Retrieves the collected profiling data and returns it in flat form. The result is a matrix with the following columns:
- `[;1]` – function name
- `[;2]` – function line number or `⍬` for a whole function entry
@@ -142,19 +144,13 @@ Numbers in this example have been truncated for formatting purposes.
#.NS1.goo 3 10000 19.60274 19.6027 10000 10000
```
-If `X` is specified, it must be a simple vector of column indices. The result `R` has the same shape as `X`, and is a vector of the specified column vectors.
-
-```apl
-X ⎕PROFILE 'data' ←→ ↓[⎕IO](⎕PROFILE 'data')[;X]
-```
-
If `[;2]` is included in the result, then the value `¯1` is used instead of `⍬` to indicate a whole-function entry.
### Retrieve Data (Tree Form)
Syntax: `data←{X} ⎕PROFILE 'tree'`
-Retrieves the collected profiling data and returns it in tree form. If the `X` is omitted, the result is a matrix with the following columns:
+Retrieves the collected profiling data and returns it in tree form. The result is a matrix with the following columns:
- `[;1]` – depth level
- `[;2]` – function name
@@ -185,12 +181,6 @@ Numbers in this example have been truncated for formatting purposes.
Rows with an even depth level in `[;1]` represent function summary entries; odd depth level rows are function line entries. Recursive functions generate separate rows for each level of recursion.
-If `X` is specified, it must be a simple vector of column indices. The result `R` has the same shape as `X`, and is a vector of the specified column vectors.
-
-```apl
-X ⎕PROFILE 'tree' ←→ ↓[⎕IO](⎕PROFILE 'tree')[;X]
-```
-
## Profile Data Entry Types
The results of `⎕PROFILE 'data'` and `⎕PROFILE 'tree'` have two types of entries; function summary entries and function line entries. Function summary entries contain `⍬` in the line number column, whereas function line entries contain the line number. Line entries for dfns start with 0 as, unlike tradfns, they do not have a header line. The timer data and timer call counts in function summary entries represent the aggregate of the function line entries plus any time spent that cannot be directly attributed to a function line entry. This could include time spent during function initialisation, and so on.
diff --git a/language-reference-guide/docs/system-functions/r.md b/language-reference-guide/docs/system-functions/r.md
index 846f2a0e18b..652c51fa9fc 100644
--- a/language-reference-guide/docs/system-functions/r.md
+++ b/language-reference-guide/docs/system-functions/r.md
@@ -163,7 +163,7 @@ The following characters have special meaning:
|\& |represents the ampersand character |
|\x{ *nnnn* }|represents a Unicode code point; *nnnn* is a hexadecimal sequence of characters yielding a value between 0x1 and 0x10FFFF. |
-The above may be qualified so that matching text is folded, or mapped to upper- or lower-case, by using the **f**, **u**, and **l** modifiers respectively; the effect is as if the text was processed by `⎕C`. See [Case Convert](c.md).
+The above may be qualified so that matching text is folded, or mapped to upper- or lower-case, by using the **f**, **u**, and **l** modifiers respectively; the effect is as if the text was processed by `⎕C`. See [Case Convert](c-monadic.md).
Character sequences beginning with the backslash place the modifier after the backslash; character sequences with no leading backslash add both a backslash and the modifier to the start of the sequence, for example:
diff --git a/language-reference-guide/docs/system-functions/shell.md b/language-reference-guide/docs/system-functions/shell.md
index aa7390af6a3..2cc78849b2c 100644
--- a/language-reference-guide/docs/system-functions/shell.md
+++ b/language-reference-guide/docs/system-functions/shell.md
@@ -99,7 +99,7 @@ In practice, the child process often closes shortly after without the need for i
## Thread Switching
`⎕SHELL` is a thread switch point, which means the interpreter will run other APL threads while a long-running `⎕SHELL` call is in progress.
-When an APL thread running `⎕SHELL` is terminated by [`⎕TKILL`](tkill.md) or [`)RESET`](../system-commands/reset.md), the child process might be left running, as if `⎕SHELL` was interrupted.
+When an APL thread running `⎕SHELL` is terminated by [`⎕TKILL`](tkill-monadic.md) or [`)RESET`](../system-commands/reset.md), the child process might be left running, as if `⎕SHELL` was interrupted.
## Variant Options
`⎕SHELL` supports the following variant options to control certain parts of the program execution context.
@@ -123,8 +123,8 @@ Any output the child process produces on its stream `Stream` will go to the spec
| `('File' n)` | Redirect the output to an open native file with tie number `n`. The file must be writable. |
| `('File' path)` | Redirect the output to an existing file with a path described by the character vector `path`. The output is appended to the end of the file. |
| `('Array' type)` | Redirect the output to the interpreter, which will convert it into a vector with data type `type`, and include it in the result of `⎕SHELL`. For example, to get standard output as a Boolean vector, the variant value would be `(1 ('Array' 11))`. |
-| `'Array'` | Redirect the output to the interpreter, which will convert it to a vector of character vectors, split into the separate lines of text. Note that the line endings and text encoding are determined automatically, like when reading files using monadic [`⎕NGET`](nget.md). The nested array is included as part of the result of `⎕SHELL`. |
-| `('Array' textEncoding)` | Redirect the output to the interpreter like with the `'Array'` format above, but use a specific text encoding, described by the character vector `textEncoding`. The possible values for `textEncodings` are those which are allowed as the left argument to dyadic [`⎕NGET`](nget.md). |
+| `'Array'` | Redirect the output to the interpreter, which will convert it to a vector of character vectors, split into the separate lines of text. Note that the line endings and text encoding are determined automatically, like when reading files using monadic [`⎕NGET`](nget-monadic.md). The nested array is included as part of the result of `⎕SHELL`. |
+| `('Array' textEncoding)` | Redirect the output to the interpreter like with the `'Array'` format above, but use a specific text encoding, described by the character vector `textEncoding`. The possible values for `textEncodings` are those which are allowed as the left argument to dyadic [`⎕NGET`](nget-monadic.md). |
| `'Null'` | Redirect the output to the operating-system's null device, which effectively means the output is ignored. |
| `('Callback' fn encodingOrType)` | Redirect the output to the interpreter, which periodically will turn the data produced into an array, and run a callback function specified in `fn`. `fn` can either be a character vector, in which case it is the name of the function to run, or it can be a 2-element vector where the first element is the function name, and the second element is some arbitrary data which will be passed as the left argument to the callback function. When `encodingOrType` is a scalar integer, the conversion behaves as with `('Array' type)`, and otherwise it behaves as `('Array' textEncoding)`. |
| `('Callback' fn)` | This is identical to the other callback format, with the difference that the data is converted into lines of text in the same way as when the `'Array'` format is used, using heuristics to determine the line endings and text encoding. |
@@ -181,7 +181,7 @@ Any input the child process tries to read on its stream `Stream` will come from
| `('Array' Data Encoding)` | This is similar to `('Array' Data Type)`, but `Data` must be either a character vector, or a vector of character vectors. Each character vector is converted to text in the given `Encoding`, and terminated by a newline character/character sequence. The `Encoding` must be one of those supported by [`⎕NPUT`](nput.md). |
| `('Array' Data Encoding Newline)` | Similar to `('Array' Data Encoding)`, but provides explicit control over the newline character/sequence. `Newline` must be one of the values supported by [`⎕NPUT`](nput.md). |
| `'Null'` | Input comes from the operating-system's null device, which effectively means no input is provided. |
-| `('Token' n)` | `⎕SHELL` will periodically see if any tokens are available on the token number `n`, such as those produced by `X ⎕TPUT n`. When one becomes available, the token data `X` is parsed as one of the `('Array' ...)` sources, and appended to a buffer of data that the child process then sees on the specified stream. A token with no data, as constructed by a monadic [`⎕TPUT`](tput.md) call, closes the stream. This, combined with running `⎕SHELL` on its own APL thread, provides a mechanism for feeding a child process input input dynamically. |
+| `('Token' n)` | `⎕SHELL` will periodically see if any tokens are available on the token number `n`, such as those produced by `X ⎕TPUT n`. When one becomes available, the token data `X` is parsed as one of the `('Array' ...)` sources, and appended to a buffer of data that the child process then sees on the specified stream. A token with no data, as constructed by a monadic [`⎕TPUT`](tput-monadic.md) call, closes the stream. This, combined with running `⎕SHELL` on its own APL thread, provides a mechanism for feeding a child process input input dynamically. |
The default is `0 2⍴0`, but see [Default Redirections](#default-redirections).
diff --git a/language-reference-guide/docs/system-functions/signal-disambiguation.md b/language-reference-guide/docs/system-functions/signal-disambiguation.md
new file mode 100644
index 00000000000..2bb3682085d
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/signal-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Signal Event `⎕SIGNAL`
+
+## Monadic `⎕SIGNAL` means
+
+[Signal Default/Custom Event](signal-monadic.md)
+
+## Dyadic `⎕SIGNAL` means
+
+[Signal Event with Custom Name](signal-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/signal-dyadic.md b/language-reference-guide/docs/system-functions/signal-dyadic.md
new file mode 100644
index 00000000000..a1a5492df69
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/signal-dyadic.md
@@ -0,0 +1,110 @@
+---
+search:
+ boost: 2
+---
+
+# Signal Event with Custom Name `{R}←X ⎕SIGNAL Y`{{key}}
+
+`Y` must be a scalar or vector.
+
+To signal an event without a custom message, use [monadic `⎕SIGNAL`](signal-monadic.md).
+
+If `Y` is a an empty vector nothing is signalled.
+
+If `Y` is a vector of more than one element, all but the first element are ignored.
+
+`R` has the same value as `Y`.
+
+`Y=0` is a special form of `⎕SIGNAL`, the side effect of which is to reset the values of certain system constants. It is described further down this section.
+
+If the first element of `Y` is a simple integer it is taken to be an event number. Permitted values are 0, 1-999 and 1006. `X` is a text message. If present, `X` must be a simple character scalar or vector, or an object reference. If `X` is empty, the standard event message for the corresponding event number is assumed. See ["APL Error Messages"](../../../programming-reference-guide/error-messages/apl-errors). If there is no standard message, a message of the form `ERROR NUMBER n` is composed, where `n` is the event number in `Y`. Values outside the permitted range will result in a `DOMAIN ERROR`.
+
+If the first element of `Y` is a 2 column matrix or a vector of 2 element vectors of name/values pairs, then it is considered to be a set of values to be used to override the default values in a new instance of `⎕DMX`. Any other value for the first element of `Y` will result in a `DOMAIN ERROR`.
+
+The names in the error specification must all appear in a system-generated `⎕DMX`, otherwise a `DOMAIN ERROR` will be issued. For each name specified, the default value in the new instance of `⎕DMX` is replaced with the value specified. `EN` must be one of the names in the error specification. Attempting to specify certain names, including `InternalLocation` and `DM`, will result in a `DOMAIN ERROR`. The value which is to be assigned to a name must be appropriate to the name in question.
+
+Dyalog may enhance `⎕DMX` in future, thus potentially altering the list of valid and/or assignable names.
+
+If the first element of `Y` is an array of name/value pairs then specifying any value for `X` will result in a `DOMAIN ERROR`.
+
+The effect of the system function is to interrupt execution. The state indicator is cut back to exit from the function or operator containing the line that invoked `⎕SIGNAL`, or is cut back to exit the Execute (`⍎`) expression that invoked `⎕SIGNAL`. If executed within a nested dfn, the state indicator is cut back to exit from the capsule containing the line that invoked `⎕SIGNAL`. An error is then generated.
+
+An error interrupt may be trapped if the system variable `⎕TRAP` is set to intercept the event. Otherwise, the standard system action is taken (which may involve cutting back the state indicator further if there are locked functions or operators in the state indicator). The standard event message is replaced by the text given in `X`, if present.
+
+Example
+```apl
+ ⎕VR'DIVIDE'
+ ∇ R←A DIVIDE B;⎕TRAP
+[1] ⎕TRAP←11 'E' '→ERR'
+[2] R←A÷B ⋄ →0
+[3] ERR:'DIVISION ERROR' ⎕SIGNAL 11
+ ∇
+
+ 2 4 6 DIVIDE 0
+DIVISION ERROR
+ 2 4 6 DIVIDE 0
+ ^
+```
+
+If you are using the Microsoft .NET Framework, you may use `⎕SIGNAL` to throw an exception by specifying a value of 90 in `Y`. In this case, if you specify the left argument `X`, it must be a reference to a .NET object that is or derives from the Microsoft .NET class System.Exception. The following example illustrates a *constructor* function `CTOR` that expects to be called with a value for `⎕IO` (0 or 1)
+```apl
+ ∇ CTOR IO;EX
+[1] :If IO∊0 1
+[2] ⎕IO←IO
+[3] :Else
+[4] EX←ArgumentException.New'IO must be 0 or 1'
+[5] EX ⎕SIGNAL 90
+[6] :EndIf
+ ∇
+```
+
+## `⎕SIGNAL 0`: Reset error-related system constants
+
+If `Y` is a simple integer with the value 0, `⎕SIGNAL` does not interrupt execution, but merely returns the value 0. The side effect of calling `⎕SIGNAL 0` is to reset the values of `⎕DM`, `⎕DMX`, `⎕EN` and `⎕EXCEPTION` to their default values. `⎕SIGNAL 0` is the only form of `⎕SIGNAL` which can be used to reset the aforementioned system constants; including a left argument or using a name/value pair right argument of `⎕SIGNAL` will result in a `DOMAIN ERROR`.
+
+## Further examples
+
+## Example 1
+```apl
+
+ 'Hello'⎕SIGNAL 200
+Hello
+ 'Hello'⎕SIGNAL 200
+ ∧
+ ⎕DMX
+ EM Hello
+ Message
+
+ ⎕DM
+ Hello 'Hello'⎕SIGNAL 200 ∧
+
+```
+```apl
+
+
+ ⎕DMX
+ EM ERROR 200
+ Message
+
+ ⎕DM
+ ERROR 200 ⎕SIGNAL⊂⊂('EN' 200) ∧
+
+```
+
+## Example 2
+```apl
+ ⎕DMX
+ EM ERROR 200
+ Message My error
+```
+```apl
+ ⍪⎕DMX.(EN EM Vendor)
+ 200
+ ERROR 200
+ Andy
+```
+
+
+
+ ⎕SIGNAL SIGNAL
+
diff --git a/language-reference-guide/docs/system-functions/signal.md b/language-reference-guide/docs/system-functions/signal-monadic.md
similarity index 70%
rename from language-reference-guide/docs/system-functions/signal.md
rename to language-reference-guide/docs/system-functions/signal-monadic.md
index 7d20ddee798..c054823cad3 100644
--- a/language-reference-guide/docs/system-functions/signal.md
+++ b/language-reference-guide/docs/system-functions/signal-monadic.md
@@ -3,10 +3,12 @@ search:
boost: 2
---
-# Signal Event `{R}←{X}⎕SIGNAL Y`{{key}}
+# Signal Default/Custom Event `{R}←⎕SIGNAL Y`{{key}}
`Y` must be a scalar or vector.
+To attach a custom message to the event, use [dyadic `⎕SIGNAL`](signal-dyadic.md).
+
If `Y` is a an empty vector nothing is signalled.
If `Y` is a vector of more than one element, all but the first element are ignored.
@@ -15,7 +17,7 @@ If `Y` is a vector of more than one element, all but the first element are ignor
`Y=0` is a special form of `⎕SIGNAL`, the side effect of which is to reset the values of certain system constants. It is described further down this section.
-If the first element of `Y` is a simple integer it is taken to be an event number. Permitted values are 0, 1-999 and 1006. `X` is an optional text message. If present, `X` must be a simple character scalar or vector, or an object reference. If `X` is omitted or is empty, the standard event message for the corresponding event number is assumed. See ["APL Error Messages"](../../../programming-reference-guide/error-messages/apl-errors). If there is no standard message, a message of the form `ERROR NUMBER n` is composed, where `n` is the event number in `Y`. Values outside the permitted range will result in a `DOMAIN ERROR`.
+If the first element of `Y` is a simple integer it is taken to be an event number. Permitted values are 0, 1-999 and 1006. The standard event message for the corresponding event number is assumed. See ["APL Error Messages"](../../../programming-reference-guide/error-messages/apl-errors). If there is no standard message, a message of the form `ERROR NUMBER n` is composed, where `n` is the event number in `Y`. Values outside the permitted range will result in a `DOMAIN ERROR`.
If the first element of `Y` is a 2 column matrix or a vector of 2 element vectors of name/values pairs, then it is considered to be a set of values to be used to override the default values in a new instance of `⎕DMX`. Any other value for the first element of `Y` will result in a `DOMAIN ERROR`.
@@ -23,38 +25,13 @@ The names in the error specification must all appear in a system-generated `⎕
Dyalog may enhance `⎕DMX` in future, thus potentially altering the list of valid and/or assignable names.
-If the first element of `Y` is an array of name/value pairs then specifying any value for `X` will result in a `DOMAIN ERROR`.
-
The effect of the system function is to interrupt execution. The state indicator is cut back to exit from the function or operator containing the line that invoked `⎕SIGNAL`, or is cut back to exit the Execute (`⍎`) expression that invoked `⎕SIGNAL`. If executed within a nested dfn, the state indicator is cut back to exit from the capsule containing the line that invoked `⎕SIGNAL`. An error is then generated.
-An error interrupt may be trapped if the system variable `⎕TRAP` is set to intercept the event. Otherwise, the standard system action is taken (which may involve cutting back the state indicator further if there are locked functions or operators in the state indicator). The standard event message is replaced by the text given in `X`, if present.
+An error interrupt may be trapped if the system variable `⎕TRAP` is set to intercept the event. Otherwise, the standard system action is taken (which may involve cutting back the state indicator further if there are locked functions or operators in the state indicator).
Example
-```apl
- ⎕VR'DIVIDE'
- ∇ R←A DIVIDE B;⎕TRAP
-[1] ⎕TRAP←11 'E' '→ERR'
-[2] R←A÷B ⋄ →0
-[3] ERR:'DIVISION ERROR' ⎕SIGNAL 11
- ∇
-
- 2 4 6 DIVIDE 0
-DIVISION ERROR
- 2 4 6 DIVIDE 0
- ^
-```
-If you are using the Microsoft .NET Framework, you may use `⎕SIGNAL` to throw an exception by specifying a value of 90 in `Y`. In this case, if you specify the optional left argument `X`, it must be a reference to a .NET object that is or derives from the Microsoft .NET class System.Exception. The following example illustrates a *constructor* function `CTOR` that expects to be called with a value for `⎕IO` (0 or 1)
-```apl
- ∇ CTOR IO;EX
-[1] :If IO∊0 1
-[2] ⎕IO←IO
-[3] :Else
-[4] EX←ArgumentException.New'IO must be 0 or 1'
-[5] EX ⎕SIGNAL 90
-[6] :EndIf
- ∇
-```
+If you are using the Microsoft .NET Framework, you may use `⎕SIGNAL` to throw an exception by specifying a value of 90 in `Y`. In this case, it must be a reference to a .NET object that is or derives from the Microsoft .NET class System.Exception. The following example illustrates a *constructor* function `CTOR` that expects to be called with a value for `⎕IO` (0 or 1)
## `⎕SIGNAL 0`: Reset error-related system constants
@@ -85,20 +62,6 @@ DOMAIN ERROR: Divide by zero
## Further examples
## Example 1
-```apl
-
- 'Hello'⎕SIGNAL 200
-Hello
- 'Hello'⎕SIGNAL 200
- ∧
- ⎕DMX
- EM Hello
- Message
-
- ⎕DM
- Hello 'Hello'⎕SIGNAL 200 ∧
-
-```
```apl
⎕SIGNAL⊂⊂('EN' 200)
@@ -110,9 +73,6 @@ ERROR 200
EM ERROR 200
Message
- ⎕DM
- ERROR 200 ⎕SIGNAL⊂⊂('EN' 200) ∧
-
```
## Example 2
diff --git a/language-reference-guide/docs/system-functions/sr-disambiguation.md b/language-reference-guide/docs/system-functions/sr-disambiguation.md
new file mode 100644
index 00000000000..17b18ff1dd5
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/sr-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Screen Read `⎕SR`
+
+## Monadic `⎕SR` means
+
+[Screen Read](sr-monadic.md)
+
+## Dyadic `⎕SR` means
+
+[Custom Screen Read](sr-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/sr.md b/language-reference-guide/docs/system-functions/sr-dyadic.md
similarity index 95%
rename from language-reference-guide/docs/system-functions/sr.md
rename to language-reference-guide/docs/system-functions/sr-dyadic.md
index 97a4adb05c0..1508b4be8c6 100644
--- a/language-reference-guide/docs/system-functions/sr.md
+++ b/language-reference-guide/docs/system-functions/sr-dyadic.md
@@ -3,10 +3,12 @@ search:
boost: 2
---
-# Screen Read `R←{X}⎕SR Y`{{key}}
+# Custom Screen Read `R←X ⎕SR Y`{{key}}
`⎕SR` is a system function that allows the user to edit or otherwise interact with the form defined by `⎕SM`.
+For screen input with the default settings, use [monadic `⎕SR`](sr-monadic.md).
+
In versions of Dyalog APL that support asynchronous terminals, if the current screen is the SESSION screen, `⎕SR` immediately switches to the USER SCREEN and displays the form defined by `⎕SM`.
In Dyalog APL/X, `⎕SR` causes the input cursor to be positioned in the USER window. During execution of `⎕SR`, only the USER Window defined by `⎕SM` will accept input and respond to the keyboard or mouse. The SESSION and any EDIT and TRACE Windows that may appear on the display are dormant.
@@ -15,14 +17,12 @@ In versions of Dyalog APL with GUI support, a single SM object may be defined.
`Y` is an integer vector that specifies the fields which the user may visit. In versions with GUI support, `Y` may additionally contain the names of GUI objects with which the user may also interact.
-If specified, `X` may be an enclosed vector of character vectors defining `EXIT_KEYS` or a 2-element nested vector defining `EXIT_KEYS` and the `INITIAL_CONTEXT`.
+`X` can be an enclosed vector of character vectors defining `EXIT_KEYS` or a 2-element nested vector defining `EXIT_KEYS` and the `INITIAL_CONTEXT`.
The result `R` is the `EXIT_CONTEXT`.
Thus the 3 uses of `⎕SR` are:
```apl
- EXIT_CONTEXT←⎕SR FIELDS
-
EXIT_CONTEXT←(⊂EXIT_KEYS)⎕SR FIELDS
EXIT_CONTEXT←(EXIT_KEYS)(INITIAL_CONTEXT)⎕SR FIELDS
diff --git a/language-reference-guide/docs/system-functions/sr-monadic.md b/language-reference-guide/docs/system-functions/sr-monadic.md
new file mode 100644
index 00000000000..038efe282f5
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/sr-monadic.md
@@ -0,0 +1,114 @@
+---
+search:
+ boost: 2
+---
+
+# Screen Read `R←⎕SR Y`{{key}}
+
+`⎕SR` is a system function that allows the user to edit or otherwise interact with the form defined by `⎕SM`.
+
+To define the exit keys and initial context, use [dyadic `⎕SR`](sr-dyadic.md).
+
+In versions of Dyalog APL that support asynchronous terminals, if the current screen is the SESSION screen, `⎕SR` immediately switches to the USER SCREEN and displays the form defined by `⎕SM`.
+
+In Dyalog APL/X, `⎕SR` causes the input cursor to be positioned in the USER window. During execution of `⎕SR`, only the USER Window defined by `⎕SM` will accept input and respond to the keyboard or mouse. The SESSION and any EDIT and TRACE Windows that may appear on the display are dormant.
+
+In versions of Dyalog APL with GUI support, a single SM object may be defined. This object defines the size and position of the `⎕SM` window, and allows `⎕SM` to be used in conjunctions with other GUI components. In these versions, `⎕SR` acts as a superset of `⎕DQ` (see [Dequeue Events](dq.md)) but additionally controls the character-based user interface defined by `⎕SM`.
+
+`Y` is an integer vector that specifies the fields which the user may visit. In versions with GUI support, `Y` may additionally contain the names of GUI objects with which the user may also interact.
+
+The result `R` is the `EXIT_CONTEXT`.
+
+Thus the 3 uses of `⎕SR` are:
+```apl
+ EXIT_CONTEXT←⎕SR FIELDS
+
+```
+
+## FIELDS
+
+If an element of `Y` is an integer scalar, it specifies a field as the index of a row in `⎕SM` (if `⎕SM` is a vector it is regarded as having 1 row).
+
+If an element of `Y` is an integer vector, it specifies a sub-field. The first element in `Y` specifies the top-level field as above. The next element is used to index a row in the form defined by `⊃⎕SM[Y[1];1]` and so forth.
+
+If an element of `Y` is a character scalar or vector, it specifies the name of a top-level GUI object with which the user may also interact. Such an object must be a "top-level" object, that is, the `Root` object ('`.'`) or a `Form` or pop-up `Menu`. This feature is implemented ONLY in versions of Dyalog APL with GUI support.
+
+## EXIT_KEYS
+
+Each element of `EXIT_KEYS` is a 2-character code from the Input Translate Table for the keyboard. If the user presses one of these keys, `⎕SR` will terminate and return a result.
+
+If `EXIT_KEYS` is not specified, it defaults to:
+```apl
+ 'ER' 'EP' 'QT'
+```
+
+which (normally) specifies , and .
+
+## INITIAL_CONTEXT
+
+This is a vector of between 3 and 6 elements with the following meanings and defaults:
+
+|Element|Description |Default|
+|-------|-----------------------------|-------|
+|1 |Initial Field |N/A |
+|2 |Initial Cursor Position - Row|N/A |
+|3 |Initial Cursor Position - Col|N/A |
+|4 |Initial Keystroke |`''` |
+|5 |(ignored) |N/A |
+|6 |Changed Field Flags |0 |
+
+Structure of INITIAL_CONTEXT
+
+`INITIAL_CONTEXT[1]` specifies the field in which the cursor is to be placed. It is an integer scalar or vector, and must be a member of `Y`. It must not specify a field which has `BUTTON` behaviour (64), as the cursor is not allowed to enter such a field.
+
+`INITIAL_CONTEXT[2 3]` are integer scalars which specify the initial cursor position within the field in terms of row and column numbers.
+
+`INITIAL_CONTEXT[4]` is either empty, or a 2-element character vector specifying the initial keystroke as a code from the Input Translate Table for the keyboard.
+
+`INITIAL_CONTEXT[5]` is ignored. It is included so that the `EXIT_CONTEXT` result of one call to `⎕SR` can be used as the `INITIAL_CONTEXT` to a subsequent call.
+
+`INITIAL_CONTEXT[6]` is a Boolean scalar or vector the same length as `Y`. It specifies which of the fields in `Y` has been modified by the user.
+
+## EXIT_CONTEXT
+
+The result `EXIT_CONTEXT` is a 6 or 9-element vector whose first 6 elements have the same structure as the `INITIAL_CONTEXT`. Elements 7-9 **only** apply to those versions of Dyalog APL that provide mouse support.
+
+|Element|Description |
+|-------|---------------------------|
+|1 |Final Field |
+|2 |Final Cursor Position - Row|
+|3 |Final Cursor Position - Col|
+|4 |Terminating Keystroke |
+|5 |Event Code |
+|6 |Changed Field Flags |
+|7 |Pointer Field |
+|8 |Pointer Position - Row |
+|9 |Pointer Position - Col |
+
+Structure of the Result of `⎕SR`
+
+`EXIT_CONTEXT[1]` contains the field in which the cursor was when `⎕SR` terminated due to the user pressing an exit key or due to an event occurring. It is an integer scalar or vector, and a member of `Y`.
+
+`EXIT_CONTEXT[2 3]` are integer scalars which specify the row and column position of the cursor within the field `EXIT_CONTEXT[1]` when `⎕SR` terminated.
+
+`EXIT_CONTEXT[4]` is a 2-element character vector specifying the last keystroke pressed by the user before `⎕SR` terminated. Unless `⎕SR` terminated due to an event, `EXIT_CONTEXT[4]` will contain one of the exit keys. The keystroke is defined in terms of an Input Translate Table code.
+
+`EXIT_CONTEXT[5]` contains the **sum** of the event codes that caused `⎕SR` to terminate. For example, if the user pressed a mouse button on a `BUTTON` field (event code 64) **and** the current field has `MODIFIED` behaviour (event code 2) `EXIT_CONTEXT[5]` will have the value 66.
+
+`EXIT_CONTEXT[6]` is a Boolean scalar or vector the same length as `Y`. It specifies which of the fields in `Y` has been modified by the user during **this** `⎕SR`, ORed with `INITIAL_CONTEXT[6]`. Thus if the `EXIT_CONTEXT` of one call to `⎕SR` is fed back as the `INITIAL_CONTEXT` of the next, `EXIT_CONTEXT[6]` records the fields changed since the start of the process.
+
+## EXIT_CONTEXT (Window Versions)
+
+`⎕SR` returns a 9-element result **ONLY** if it is terminated by the user pressing a mouse button. In this case:
+
+`EXIT_CONTEXT[7]` contains the field over which the mouse pointer was positioned when the user pressed a button. It is an integer scalar or vector, and a member of `Y`.
+
+`EXIT_CONTEXT[8 9]` are integer scalars which specify the row and column position of the mouse pointer within the field `EXIT_CONTEXT[7]` when `⎕SR` terminated.
+
+!!! note
+ This function is disabled and instead generates a `DOMAIN ERROR` if the RIDE_SPAWNED parameter is non-zero. This is designed to prevent it being invoked from a Ride session which does not support this type of user interface. For further details, see the [Ride User Guide](https://dyalog.github.io/ride).
+
+
+
+ ⎕SR SR
+
diff --git a/language-reference-guide/docs/system-functions/system-functions-by-category.md b/language-reference-guide/docs/system-functions/system-functions-by-category.md
index 850d5234ee0..f1ed5dada4d 100644
--- a/language-reference-guide/docs/system-functions/system-functions-by-category.md
+++ b/language-reference-guide/docs/system-functions/system-functions-by-category.md
@@ -35,7 +35,8 @@ These provide information on, and control, the current workspace and its content
|[`⎕EX`](ex.md) |Expunge objects |Monadic function|
|[`⎕LX`](lx.md) |Latent Expression |Variable|
|[`⎕NC`](nc.md) |Name Classification |Monadic function|
-|[`⎕NL`](nl.md) |Name List |Monadic function|
+|[`⎕NL`](nl-monadic.md)|List Object Names |Monadic function|
+|[`⎕NL`](nl-dyadic.md)|List Object Names with Filter|Dyadic function |
|[`⎕SHADOW`](shadow.md)|Shadow names |Monadic function|
|[`⎕SIZE`](size.md) |Size of objects |Monadic function|
|[`⎕WA`](wa.md) |Workspace Available |Constant|
@@ -47,13 +48,16 @@ These are tools that allow you perform development environment actions under pro
|Name |Description |Form|
|----------|------------------------|-----|
-|[`⎕ED`](ed.md) |Edit one or more objects|Ambivalent function|
+|[`⎕ED`](ed-monadic.md)|Edit Objects |Monadic function |
+|[`⎕ED`](ed-dyadic.md)|Edit Objects with Type |Dyadic function |
|[`⎕EX`](ex.md) |Expunge objects |Monadic function|
-|[`⎕LOCK`](lock.md) |Lock a function |Ambivalent function|
+|[`⎕LOCK`](lock-monadic.md)|Lock Function |Monadic function |
+|[`⎕LOCK`](lock-dyadic.md)|Custom Lock Function |Dyadic function |
|[`⎕MONITOR`](set-monitor.md)|Monitor set |Dyadic function|
|[`⎕MONITOR`](query-monitor.md)|Monitor query|Monadic function|
|[`⎕OR`](or.md) |Object Representation |Monadic function|
-|[`⎕PROFILE`](profile.md)|Profile Application|Ambivalent function|
+|[`⎕PROFILE`](profile-monadic.md)|Profile Code |Monadic function |
+|[`⎕PROFILE`](profile-dyadic.md)|Filter Profile Data|Dyadic function |
|[`⎕REFS`](refs.md) |Local References |Monadic function|
|[`⎕STOP`](set-stop.md) |Set Stop vector |Dyadic function|
|[`⎕STOP`](query-stop.md) |Query Stop vector|Monadic function|
@@ -67,16 +71,21 @@ These are facilities to create, manipulate, and navigate namespaces and other ob
|Name |Description |Form|
|------------|--------------|-----|
|[`⎕BASE`](base.md) |Base Class |Reference|
-|[`⎕CLASS`](class.md) |Class |Monadic function|
+|[`⎕CLASS`](class-monadic.md)|Class Hierarchy|Monadic function|
+|[`⎕CLASS`](class-dyadic.md)|Get Class/Interface Implementation|Dyadic function |
|[`⎕CS`](cs.md) |Change Space |Monadic function|
|[`⎕DF`](df.md) |Display Format |Monadic function|
-|[`⎕FIX`](fix.md) |Fix |Ambivalent function|
+|[`⎕FIX`](fix-monadic.md)|Define Namespace|Monadic function |
+|[`⎕FIX`](fix-dyadic.md)|Define Objects|Dyadic function |
|[`⎕INSTANCES`](instances.md)|Instances|Monadic function|
|[`⎕NEW`](new.md) |New Instance |Monadic function|
-|[`⎕NS`](ns.md) |Namespace |Ambivalent function|
+|[`⎕NS`](ns-monadic.md)|Create/Clone Namespace|Monadic function |
+|[`⎕NS`](ns-dyadic.md)|Create/Clone Custom Namespaces|Dyadic function |
|[`⎕THIS`](this.md) |Self-reference|Reference|
-|[`⎕VGET`](vget.md) |Value Get |Ambivalent function|
-|[`⎕VSET`](vset.md) |Value Set |Ambivalent function|
+|[`⎕VGET`](vget-monadic.md)|Get Value from Current Namespace|Monadic function |
+|[`⎕VGET`](vget-dyadic.md)|Get Value from Namespace|Dyadic function |
+|[`⎕VSET`](vset-monadic.md)|Set Value in Current Namespace|Monadic function |
+|[`⎕VSET`](vset-dyadic.md)|Set Value in Namespace|Dyadic function |
### Built-in Objects and Windows GUI
@@ -85,12 +94,17 @@ These are facilities for dealing with built-in objects. They mostly represent Mi
|Name |Description |Form|
|---------|---------------------------|-----|
|[`⎕DQ`](dq.md) |Await and process events |Monadic function|
-|[`⎕NQ`](nq.md) |Place an event on the Queue|Ambivalent function|
+|[`⎕NQ`](nq-monadic.md)|Enqueue Event |Monadic function |
+|[`⎕NQ`](nq-dyadic.md)|Custom Enqueue Event |Dyadic function |
|[`⎕SE`](se.md) |Session Namespace |Reference|
-|[`⎕WC`](wc.md) |Create GUI object |Ambivalent function|
-|[`⎕WG`](wg.md) |Get GUI object properties |Ambivalent function|
-|[`⎕WN`](wn.md) |Query GUI object Names |Ambivalent function|
-|[`⎕WS`](ws.md) |Set GUI object properties |Ambivalent function|
+|[`⎕WC`](wc-monadic.md)|Convert Namespace to GUI Object|Monadic function |
+|[`⎕WC`](wc-dyadic.md)|Create GUI Object |Dyadic function |
+|[`⎕WG`](wg-monadic.md)|Get Properties of Current GUI Object|Monadic function |
+|[`⎕WG`](wg-dyadic.md)|Get Properties of GUI Object|Dyadic function |
+|[`⎕WN`](wn-monadic.md)|Get GUI Child Names in Current Object|Monadic function |
+|[`⎕WN`](wn-dyadic.md)|Get GUI Child Names in Parent Object|Dyadic function |
+|[`⎕WS`](ws-monadic.md)|Set Properties of Current GUI Object|Monadic function |
+|[`⎕WS`](ws-dyadic.md)|Set Properties of GUI Object|Dyadic function |
|[`⎕WX`](wx.md) |Expose GUI property names |Variable|
### Modifying Language Behaviour
@@ -152,18 +166,24 @@ These are tools to convert between common representations of data.
|Name |Description |Form|
|--------|--------------------------------------------------------|----|
-|[`⎕C`](c.md) |Case Convert |Ambivalent function|
-|[`⎕CSV`](csv.md) |Comma Separated Values |Ambivalent function|
+|[`⎕C`](c-monadic.md)|Case Fold |Monadic function |
+|[`⎕C`](c-dyadic.md)|Case Map |Dyadic function |
+|[`⎕CSV`](csv-monadic.md)|Import CSV |Monadic function |
+|[`⎕CSV`](csv-dyadic.md)|Export CSV |Dyadic function |
|[`⎕DR`](data-representation-monadic.md) |Data Representation |Monadic function|
|[`⎕DR`](data-representation-dyadic.md) |Data Representation |Dyadic function|
|[`⎕DT`](dt.md) |Datetime |Dyadic function|
|[`⎕FMT`](format-monadic.md) |Resolve display |Monadic function|
|[`⎕FMT`](format-dyadic.md) |Format array |Dyadic function|
-|[`⎕JSON`](json.md) |JSON Convert |Ambivalent function|
+|[`⎕JSON`](json-monadic.md)|Auto-convert JSON |Monadic function |
+|[`⎕JSON`](json-dyadic.md)|Convert JSON |Dyadic function |
|[`⎕TS`](ts.md) |Timestamp |Constant|
-|[`⎕UCS`](ucs.md) |Unicode Convert |Ambivalent function|
-|[`⎕VFI`](vfi.md) |Verify and Fix numeric |Ambivalent function|
-|[`⎕XML`](xml.md) |XML Convert |Ambivalent function|
+|[`⎕UCS`](ucs-monadic.md)|Convert Unicode Code Point |Monadic function |
+|[`⎕UCS`](ucs-dyadic.md)|Convert Unicode Representation |Dyadic function |
+|[`⎕VFI`](vfi-monadic.md)|Parse Numbers |Monadic function |
+|[`⎕VFI`](vfi-dyadic.md)|Parse Numbers with Separators |Dyadic function |
+|[`⎕XML`](xml-monadic.md)|Convert XML |Monadic function |
+|[`⎕XML`](xml-dyadic.md)|Custom Convert XML |Dyadic function |
### Input and Output
@@ -176,11 +196,13 @@ These are communication facilities.
|[`⎕ARBIN`](arbin.md) |Arbitrary Input |Dyadic function|
|[`⎕ARBOUT`](arbout.md)|Arbitrary Output |Dyadic function|
|[`⎕KL`](kl.md) |Key Labels |Monadic function|
-|[`⎕PFKEY`](pfkey.md)|Programmable Function Keys |Ambivalent function|
+|[`⎕PFKEY`](pfkey-monadic.md)|Query Programmable Function Key|Monadic function |
+|[`⎕PFKEY`](pfkey-dyadic.md)|Program Function Key |Dyadic function |
|[`⎕RTL`](rtl.md) |Response Time Limit |Variable|
|[`⎕SD`](sd.md) |Screen Dimensions |Constant|
|[`⎕SM`](sm.md) |Screen Map |Variable|
-|[`⎕SR`](sr.md) |Screen Read |Ambivalent function|
+|[`⎕SR`](sr-monadic.md)|Screen Read |Monadic function |
+|[`⎕SR`](sr-dyadic.md)|Custom Screen Read |Dyadic function |
### External Utilities
@@ -188,8 +210,10 @@ These are APL interfaces to various facilities outside Dyalog.
|Name |Description |Form|
|--------|--------------------------------------------------------|----|
-|[`⎕MAP`](map.md) |Map a file |Ambivalent function|
-|[`⎕NA`](na.md) |Declare a DLL function |Ambivalent function|
+|[`⎕MAP`](map-monadic.md)|Map Array File |Monadic function |
+|[`⎕MAP`](map-dyadic.md)|Map Raw Data File |Dyadic function |
+|[`⎕NA`](na-monadic.md)|Associate External Function with Own Name |Monadic function |
+|[`⎕NA`](na-dyadic.md)|Associate External Function with Custom Name |Dyadic function |
|[`⎕R`](r.md) |Replace |Dyadic operator|
|[`⎕S`](s.md) |Search |Dyadic operator|
|[`⎕SHELL`](shell.md)|Execute a shell command or another program |Monadic function|
@@ -203,13 +227,15 @@ These create, control, and manipulate component files.
|-----------|---------------------------|-----|
|[`⎕FAPPEND`](fappend.md) |Append a component to File |Dyadic function|
|[`⎕FAVAIL`](favail.md) |File system Availability |Constant|
-|[`⎕FCHK`](fchk.md) |File Check and Repair |Ambivalent function|
+|[`⎕FCHK`](fchk-monadic.md)|Check/Repair Component File|Monadic function |
+|[`⎕FCHK`](fchk-dyadic.md)|Custom Check/Repair Component File|Dyadic function |
|[`⎕FCOPY`](fcopy.md) |Copy a File |Dyadic function|
|[`⎕FCREATE`](fcreate.md) |Create a File |Dyadic function|
|[`⎕FDROP`](fdrop.md) |Drop a block of components |Dyadic function|
|[`⎕FERASE`](ferase.md) |Erase a File |Dyadic function|
|[`⎕FHIST`](fhist.md) |File History |Monadic function|
-|[`⎕FHOLD`](fhold.md) |File Hold |Ambivalent function|
+|[`⎕FHOLD`](fhold-monadic.md)|Component File Hold |Monadic function |
+|[`⎕FHOLD`](fhold-dyadic.md)|Component File Hold with Timeout|Dyadic function |
|[`⎕FLIB`](flib.md) |List File Library |Monadic function|
|[`⎕FNAMES`](fnames.md) |Names of tied Files |Constant|
|[`⎕FNUMS`](fnums.md) |Tie Numbers of tied Files |Constant|
@@ -219,7 +245,8 @@ These create, control, and manipulate component files.
|[`⎕FREAD`](fread.md) |Read a component from File |Monadic function|
|[`⎕FRENAME`](frename.md) |Rename a File |Dyadic function|
|[`⎕FREPLACE`](freplace.md)|Replace a component on File|Dyadic function|
-|[`⎕FRESIZE`](fresize.md) |File Resize |Ambivalent function|
+|[`⎕FRESIZE`](fresize-monadic.md)|Compact Component File |Monadic function |
+|[`⎕FRESIZE`](fresize-dyadic.md)|Resize Component File |Dyadic function |
|[`⎕FSIZE`](fsize.md) |File Size |Monadic function|
|[`⎕FSTAC`](fstac.md) |Set File Access matrix |Dyadic function|
|[`⎕FSTIE`](fstie.md) |Share-Tie a File |Dyadic function|
@@ -232,20 +259,25 @@ These create and manipulate files of any type as well as directories.
|Name |Description |Form|
|-----------|-------------------------------------------------------------|----|
-|[`⎕MKDIR`](mkdir.md) |Create a directory |Ambivalent function|
+|[`⎕MKDIR`](mkdir-monadic.md)|Create Directory |Monadic function |
+|[`⎕MKDIR`](mkdir-dyadic.md)|Custom Create Directory |Dyadic function |
|[`⎕NAPPEND`](nappend.md) |Append to File |Dyadic function|
|[`⎕NCOPY`](ncopy.md) |Copy files and directories |Dyadic function|
|[`⎕NCREATE`](ncreate.md) |Create a File |Dyadic function|
-|[`⎕NDELETE`](ndelete.md) |Delete a File or Directory |Ambivalent function|
+|[`⎕NDELETE`](ndelete-monadic.md)|Delete Native File |Monadic function |
+|[`⎕NDELETE`](ndelete-dyadic.md)|Custom Delete Native File |Dyadic function |
|[`⎕NERASE`](nerase.md) |Erase a File |Dyadic function|
|[`⎕NEXISTS`](nexists.md) |Discover whether or not a file or directory exists |Monadic function|
-|[`⎕NGET`](nget.md) |Read Text File |Ambivalent function|
-|[`⎕NINFO`](ninfo.md) |Query or set information about one or more files and/or directories|Ambivalent function|
+|[`⎕NGET`](nget-monadic.md)|Get Text File Content |Monadic function |
+|[`⎕NGET`](nget-dyadic.md)|Decode Text File Content |Dyadic function |
+|[`⎕NINFO`](ninfo-monadic.md)|Native File Name |Monadic function |
+|[`⎕NINFO`](ninfo-dyadic.md)|Native File Information |Dyadic function |
|[`⎕NLOCK`](nlock.md) |Lock a region of a file |Dyadic function|
|[`⎕NMOVE`](nmove.md) |Move files and directories |Dyadic function|
|[`⎕NNAMES`](nnames.md) |Names of tied Files |Constant|
|[`⎕NNUMS`](nnums.md) |Tie Numbers of tied Files |Constant|
-|[`⎕NPARTS`](nparts.md) |Split a file name into its constituent parts. |Ambivalent function|
+|[`⎕NPARTS`](nparts-monadic.md)|File Name Parts |Monadic function |
+|[`⎕NPARTS`](nparts-dyadic.md)|Normalised File Name Parts |Dyadic function |
|[`⎕NPUT`](nput.md) |Write Text File |Dyadic function|
|[`⎕NREAD`](nread.md) |Read from File |Monadic function|
|[`⎕NRENAME`](nrename.md) |Rename a File |Dyadic function|
@@ -261,10 +293,12 @@ These are facilities to handle threads such as those created by [Spawn](../primi
|Name |Description |Form|
|---------|-----------------------------|-----|
-|[`⎕TALLOC`](talloc.md) |Allocate Token Range |Ambivalent function|
+|[`⎕TALLOC`](talloc-monadic.md)|Allocate New Token Range |Monadic function |
+|[`⎕TALLOC`](talloc-dyadic.md)|Allocate Existing Token Range|Dyadic function |
|[`⎕TCNUMS`](tcnums.md) |Thread Child Numbers |Monadic function|
|[`⎕TID`](tid.md) |Current Thread Identity |Constant|
-|[`⎕TKILL`](tkill.md) |Kill Threads |Ambivalent function|
+|[`⎕TKILL`](tkill-monadic.md)|Kill Threads |Monadic function |
+|[`⎕TKILL`](tkill-dyadic.md)|Kill Threads and Descendants|Dyadic function |
|[`⎕TNAME`](tname.md) |Current Thread Name |Variable|
|[`⎕TNUMS`](tnums.md) |Thread Numbers |Constant|
|[`⎕TSYNC`](tsync.md) |Wait for Threads to Terminate|Monadic function|
@@ -276,10 +310,13 @@ These are facilities to ensure proper timing in the relationship between threads
|Name |Description |Form|
|---------|--------------------|-----|
|[`⎕DL`](dl.md) |Delay execution |Function|
-|[`⎕TALLOC`](talloc.md)|Allocate Token Range|Ambivalent function|
-|[`⎕TGET`](tget.md) |Get Tokens |Ambivalent function|
+|[`⎕TALLOC`](talloc-monadic.md)|Allocate New Token Range|Monadic function |
+|[`⎕TALLOC`](talloc-dyadic.md)|Allocate Existing Token Range|Dyadic function |
+|[`⎕TGET`](tget-monadic.md)|Get Tokens |Monadic function |
+|[`⎕TGET`](tget-dyadic.md)|Get Tokens with Timeout|Dyadic function |
|[`⎕TPOOL`](tpool.md) |Token Pool |Monadic function|
-|[`⎕TPUT`](tput.md) |Put Tokens |Ambivalent function|
+|[`⎕TPUT`](tput-monadic.md)|Put Tokens |Monadic function |
+|[`⎕TPUT`](tput-dyadic.md)|Put Tokens with Values|Dyadic function |
|[`⎕TREQ`](treq.md) |Token Requests |Monadic function|
### Stack
@@ -306,7 +343,8 @@ These are facilities to catch, cause, and investigate error events and interrupt
|[`⎕DMX`](dmx.md) |Extended Diagnostic Message |Reference|
|[`⎕EM`](em.md) |Event Messages |Monadic function|
|[`⎕EXCEPTION`](exception.md)|Reports the most recent Microsoft .NET Exception|Reference|
-|[`⎕SIGNAL`](signal.md) |Signal event |Ambivalent function|
+|[`⎕SIGNAL`](signal-monadic.md)|Signal Default/Custom Event |Monadic function |
+|[`⎕SIGNAL`](signal-dyadic.md)|Signal Event with Custom Name |Dyadic function |
|[`⎕TRAP`](trap.md) |Event Trap |Variable|
### Shared Variables
@@ -329,7 +367,8 @@ These are relevant only for the Classic (non-Unicode) edition and dealing with i
|Name |Description |Form|
|---------|---------------------------|-----|
-|[`⎕NXLATE`](nxlate.md) |Specify Translation Table |Ambivalent function|
+|[`⎕NXLATE`](nxlate-monadic.md)|Query Native File Translation Vector|Monadic function |
+|[`⎕NXLATE`](nxlate-dyadic.md)|Set Native File Translation Vector|Dyadic function |
|[`⎕Ⓐ` or `⎕Á`](underscored-alphabetic-characters.md) |Underscored Alphabetic Characters|Constant|
|[`⎕AV`](av.md) |Atomic Vector |Constant|
|[`⎕AVU`](avu.md) |Atomic Vector - Unicode |Variable|
@@ -340,13 +379,15 @@ These are deprecated facilities that are still supported for legacy purposes; Dy
|Name |Description |Form|Alternative|
|--------|---------------------------------|----|-----------|
-|[`⎕AT`](at.md) |Object Attributes |Ambivalent function|`⎕ATX` supports many more attributes|
+|[`⎕AT`](at-monadic.md)|Object Attributes |Monadic function |`⎕ATX` supports many more attributes|
+|[`⎕AT`](at-dyadic.md)|Object Attributes for APL2|Dyadic function |`⎕ATX` supports many more attributes|
|[`⎕CMD`](execute-windows-command.md) |Execute the Windows Command Processor or another program|Monadic function|`⎕SHELL` is interruptible, can separate output streams, and has lots of advanced options|
|[`⎕CMD`](start-windows-auxiliary-processor.md) |Start a Windows Auxiliary Processor|Dyadic function|DLL/shared libraries via `⎕NA`|
|[`⎕CR`](cr.md) |Canonical Representation|Monadic function|`⎕ATX` can provide source as typed|
|[`⎕DM`](dm.md) |Diagnostic Message |Constant|`⎕DMX.DM` is thread-safe|
|[`⎕EN`](en.md) |Event Number |Constant|`⎕DMX.EN` is thread-safe|
-|[`⎕EXPORT`](export.md)|Export objects |Ambivalent function|Use full (absolute or relative) namespace paths|
+|[`⎕EXPORT`](export-monadic.md)|Query Export Type |Monadic function |Use full (absolute or relative) namespace paths|
+|[`⎕EXPORT`](export-dyadic.md)|Set Export Type |Dyadic function |Use full (absolute or relative) namespace paths|
|[`⎕FX`](fx.md) |Fix definition |Monadic function|`⎕FIX` saves source as typed|
|[`⎕NR`](nr.md) |Nested Representation |Monadic function|`⎕ATX` can provide source as typed|
|[`⎕PATH`](path.md) |Search Path |Variable|Use full (absolute or relative) namespace paths|
diff --git a/language-reference-guide/docs/system-functions/system.md b/language-reference-guide/docs/system-functions/system.md
index 75bce0d409f..4b208b6cfff 100644
--- a/language-reference-guide/docs/system-functions/system.md
+++ b/language-reference-guide/docs/system-functions/system.md
@@ -32,7 +32,7 @@ Getting the currently running APL interpreter's version number:
The result `R` is a namespace in the root of the namespace where `⎕SYSTEM` was called (`#` or `⎕SE`) and contains only namespace members. Each sub-namespace contains only variable members.
!!! Info "Information"
- More members might be added in a future release of Dyalog, but `R` will remain serialisable using [`1⎕JSON`](json.md).
+ More members might be added in a future release of Dyalog, but `R` will remain serialisable using [`1⎕JSON`](json-dyadic.md).
!!! Warning "Warning"
Do attempt to add or modify members as changes will not be persisted. Instead, clone the namespace using `⎕NS ⎕SYSTEM` and modify the result, but note that this locks down dynamic values like `⎕SYSTEM.Directories.Current` and `⎕SYSTEM.OS.UTCOffset`.
@@ -58,7 +58,7 @@ This namespace provides pertinent locations in the file system.
The current working directory.
!!! Hint "Hints and Recommendations"
- This can be changed using the `]CD` user command, but doing so after [tying component files](ftie.md) or [native files](ntie.md) or [associating external functions](na.md) can lead to data loss.
+ This can be changed using the `]CD` user command, but doing so after [tying component files](ftie.md) or [native files](ntie.md) or [associating external functions](na-dyadic.md) can lead to data loss.
#### Directories.Initial
The directory from which Dyalog was started.
@@ -67,7 +67,7 @@ The directory from which Dyalog was started.
The operating system's recommended location for temporary files.
!!! Info "Information"
- This location is for an individual user and can be cleaned up without warning, so use it only as a place to put files that will immediately be used and will not be needed later. It is good practice to [delete](ndelete.md) such files when no longer needed.
+ This location is for an individual user and can be cleaned up without warning, so use it only as a place to put files that will immediately be used and will not be needed later. It is good practice to [delete](ndelete-monadic.md) such files when no longer needed.
### Executable
This namespace provides information about the specific interpreter instance in which `⎕SYSTEM` was called.
diff --git a/language-reference-guide/docs/system-functions/talloc-disambiguation.md b/language-reference-guide/docs/system-functions/talloc-disambiguation.md
new file mode 100644
index 00000000000..4c4c60ef315
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/talloc-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Allocate Token Range `⎕TALLOC`
+
+## Monadic `⎕TALLOC` means
+
+[Allocate New Token Range](talloc-monadic.md)
+
+## Dyadic `⎕TALLOC` means
+
+[Allocate Existing Token Range](talloc-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/talloc.md b/language-reference-guide/docs/system-functions/talloc-dyadic.md
similarity index 80%
rename from language-reference-guide/docs/system-functions/talloc.md
rename to language-reference-guide/docs/system-functions/talloc-dyadic.md
index ca3529eedf5..5ee6952fc81 100644
--- a/language-reference-guide/docs/system-functions/talloc.md
+++ b/language-reference-guide/docs/system-functions/talloc-dyadic.md
@@ -3,11 +3,13 @@ search:
boost: 2
---
-# Allocate Token Range `{R}←{X} ⎕TALLOC Y`{{key}}
+# Allocate Existing Token Range `{R}←X ⎕TALLOC Y`{{key}}
`Y` is either a single integer or a 2-element vector. The first (or only) item in `Y` is 0, 1, 2 or ¯1 and indicates the type of operation to perform. If it is 1, then the optional second item is a character vector.
-The optional left argument `X` identifies an existing allocated range of token numbers `n`. `X` must be a scalar greater than or equal to `n`, but must be less than `n+1`.
+To allocate a new token range, use [monadic `⎕TALLOC`](talloc-monadic.md).
+
+The left argument `X` identifies an existing allocated range of token numbers `n`. `X` must be a scalar greater than or equal to `n`, but must be less than `n+1`.
## Allocation (First element of `Y` is 1)
@@ -29,8 +31,6 @@ A de-allocated range becomes free for subsequent re-allocation by `⎕TALLOC`.
If `X` does not represent a currently allocated range, `⎕TALLOC` will signal a `DOMAIN ERROR`.
-If `X` is omitted, the result `R` is a vector of 2-element vectors identifying the range and description of all currently allocated ranges.
-
Descriptions that were not defined are returned as empty character vectors.
## Querying the Token Pool (`Y` is 2)
@@ -39,14 +39,6 @@ Descriptions that were not defined are returned as empty character vectors.
Examples
```apl
- ⎕←trg←⎕TALLOC 1 'cats'
-1
- ⎕TALLOC 0
-┌────────┐
-│┌─┬────┐│
-││1│cats││
-│└─┴────┘│
-└────────┘
⎕TPUT trg+.1 .2 .3
⎕TPUT -trg+.9
⎕TPOOL
diff --git a/language-reference-guide/docs/system-functions/talloc-monadic.md b/language-reference-guide/docs/system-functions/talloc-monadic.md
new file mode 100644
index 00000000000..4039faaf4ad
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/talloc-monadic.md
@@ -0,0 +1,45 @@
+---
+search:
+ boost: 2
+---
+
+# Allocate New Token Range `{R}←⎕TALLOC Y`{{key}}
+
+`Y` is either a single integer or a 2-element vector. The first (or only) item in `Y` is 0, 1, 2 or ¯1 and indicates the type of operation to perform. If it is 1, then the optional second item is a character vector.
+
+To allocate from an existing token range, use [dyadic `⎕TALLOC`](talloc-dyadic.md).
+
+## Allocation (First element of `Y` is 1)
+
+If the first element of `Y` is 1, the result `R` is a positive integer that identifies a range of numbers that may be used as token types for `⎕TPUT` and `⎕TGET`. That range is defined as the set of floating-point numbers between `R` and `R+1` (but not the integer end-points). Negated values of these number may also be used.
+
+In this case, the optional `Y[2]` is an arbitrary character vector that serves as a description for the allocated range of tokens.
+
+## Querying a description (`Y` is 0)
+
+The result `R` is a vector of 2-element vectors identifying the range and description of all currently allocated ranges.
+
+Examples
+```apl
+ ⎕←trg←⎕TALLOC 1 'cats'
+1
+ ⎕TALLOC 0
+┌────────┐
+│┌─┬────┐│
+││1│cats││
+│└─┴────┘│
+└────────┘
+ ⎕TPUT trg+.1 .2 .3
+ ⎕TPUT -trg+.9
+ ⎕TPOOL
+1.1 1.2 1.3 ¯1.9
+
+ ⎕TGET trg+.1 .2 .3 .9
+
+ ⎕TGET ¯1.9 ⍝ Remove the inexhaustible ¯1.9 token
+```
+
+
+
+ ⎕TALLOC TALLOC
+
diff --git a/language-reference-guide/docs/system-functions/tget-disambiguation.md b/language-reference-guide/docs/system-functions/tget-disambiguation.md
new file mode 100644
index 00000000000..f0c70e19d6a
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/tget-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Get Tokens `⎕TGET`
+
+## Monadic `⎕TGET` means
+
+[Get Tokens](tget-monadic.md)
+
+## Dyadic `⎕TGET` means
+
+[Get Tokens with Timeout](tget-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/tget-dyadic.md b/language-reference-guide/docs/system-functions/tget-dyadic.md
new file mode 100644
index 00000000000..a3785f44ea1
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/tget-dyadic.md
@@ -0,0 +1,37 @@
+---
+search:
+ boost: 2
+---
+
+# Get Tokens with Timeout `{R}←X ⎕TGET Y`{{key}}
+
+`Y` must be a simple numeric scalar or vector that specifies one or more tokens, each with a specific non-zero token type, that are to be retrieved from the pool. Non-integer values in `Y` must fall within a range that has been allocated using `⎕TALLOC`.
+
+To wait indefinitely for the tokens, use [monadic `⎕TGET`](tget-monadic.md).
+
+`X` is a time-out value in seconds.
+
+Shy result `R` is a scalar or vector containing the values of the tokens of type `Y` that have been retrieved from the token pool.
+
+Note that types of the tokens in the pool may be positive or negative, and the elements of `Y` may also be positive or negative.
+
+A request (`⎕TGET`) for a *positive* token will be satisfied by the presence of a token in the pool with the same positive or negative type. If the pool token has a positive type, it will be removed from the pool. If the pool token has a negative type, it will remain in the pool. N*egatively* typed tokens will therefore satisfy an infinite number of requests for their positive equivalents. Note that a request for a positive token will remove one if it is present, before resorting to its negative equivalent
+
+A request for a negative token type will only be satisfied by the presence of a negative token type in the pool, and that token will be removed.
+
+If, when a thread calls `⎕TGET`, the token pool satisfies **all** of the tokens specified by `Y`, the function returns immediately with a (shy) result that contains the values associated with the pool tokens. Otherwise, the function will block (wait) until **all** of the requested tokens are present or until a time-out (as specified by `X`) or a weak interrupt occurs.
+
+The `⎕TGET` operation is atomic in the sense that no tokens are taken from the pool until **all** of the requested types are present. While this last example is waiting for a 4-token, other threads could take any of the remaining 2-tokens.
+
+Note also, that repeated items in the right argument are distinct.
+
+The pool is administered on a first-in-first-out basis. This is significant only if tokens of the same type are given distinct values.
+
+`R` is an empty numeric vector `⍬` (zilde) if a timeout or a weak interrupt occurs.
+
+Note too that if a thread waiting to `⎕TGET` tokens is `⎕TKILL`ed, the thread disappears without removing any tokens from the pool. Conversely, if a thread that has removed tokens from the pools is `⎕TKILL`ed, the tokens are not returned to the pool.
+
+
+
+ ⎕TGET TGET
+
diff --git a/language-reference-guide/docs/system-functions/tget.md b/language-reference-guide/docs/system-functions/tget-monadic.md
similarity index 90%
rename from language-reference-guide/docs/system-functions/tget.md
rename to language-reference-guide/docs/system-functions/tget-monadic.md
index 55efdfc0ed7..4a91e40efba 100644
--- a/language-reference-guide/docs/system-functions/tget.md
+++ b/language-reference-guide/docs/system-functions/tget-monadic.md
@@ -3,11 +3,11 @@ search:
boost: 2
---
-# Get Tokens `{R}←{X} ⎕TGET Y`{{key}}
+# Get Tokens `{R}←⎕TGET Y`{{key}}
`Y` must be a simple numeric scalar or vector that specifies one or more tokens, each with a specific non-zero token type, that are to be retrieved from the pool. Non-integer values in `Y` must fall within a range that has been allocated using `⎕TALLOC`.
-`X` is an optional time-out value in seconds.
+To wait only a limited time for the tokens, use [dyadic `⎕TGET`](tget-dyadic.md).
Shy result `R` is a scalar or vector containing the values of the tokens of type `Y` that have been retrieved from the token pool.
@@ -17,7 +17,7 @@ A request (`⎕TGET`) for a *positive* token will be satisfied by the presence o
A request for a negative token type will only be satisfied by the presence of a negative token type in the pool, and that token will be removed.
-If, when a thread calls `⎕TGET`, the token pool satisfies **all** of the tokens specified by `Y`, the function returns immediately with a (shy) result that contains the values associated with the pool tokens. Otherwise, the function will block (wait) until **all** of the requested tokens are present or until a time-out (as specified by `X`) or a weak interrupt occurs.
+If, when a thread calls `⎕TGET`, the token pool satisfies **all** of the tokens specified by `Y`, the function returns immediately with a (shy) result that contains the values associated with the pool tokens. Otherwise, the function will block (wait) until **all** of the requested tokens are present or until a weak interrupt occurs.
For example, if the pool contains only tokens of type 2:
```apl
@@ -44,7 +44,7 @@ AC
BE
```
-`R` is an empty numeric vector `⍬` (zilde) if a timeout or a weak interrupt occurs.
+`R` is an empty numeric vector `⍬` (zilde) if a weak interrupt occurs.
**Beware** - the following statement will wait forever and can only be terminated by an interrupt.
```apl
diff --git a/language-reference-guide/docs/system-functions/tkill-disambiguation.md b/language-reference-guide/docs/system-functions/tkill-disambiguation.md
new file mode 100644
index 00000000000..6c35e466f10
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/tkill-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+# Kill Thread `⎕TKILL`
+
+## Monadic `⎕TKILL` means
+
+[Kill Threads](tkill-monadic.md)
+
+## Dyadic `⎕TKILL` means
+
+[Kill Threads and Descendants](tkill-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/tkill-dyadic.md b/language-reference-guide/docs/system-functions/tkill-dyadic.md
new file mode 100644
index 00000000000..329876ba5f8
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/tkill-dyadic.md
@@ -0,0 +1,26 @@
+---
+search:
+ boost: 2
+---
+
+# Kill Threads and Descendants `{R}←X ⎕TKILL Y`{{key}}
+
+`Y` must be a simple array of integers representing thread numbers to be terminated. `X` is a Boolean single that indicates whether all descendant threads should also be terminated.
+
+To kill only the named threads, use [monadic `⎕TKILL`](tkill-monadic.md).
+
+The shy result `R` is a vector of the numbers of all threads that have been terminated.
+
+The **base thread** 0 is always excluded from the cull.
+
+Examples
+```apl
+ 1 ⎕TKILL ⎕TID ⍝ Kill self and descendants.
+
+ 0 ⎕TKILL ⎕TID ⍝ Kill self only.
+```
+
+
+
+ ⎕TKILL TKILL
+
diff --git a/language-reference-guide/docs/system-functions/tkill.md b/language-reference-guide/docs/system-functions/tkill-monadic.md
similarity index 69%
rename from language-reference-guide/docs/system-functions/tkill.md
rename to language-reference-guide/docs/system-functions/tkill-monadic.md
index b9d66382f3d..4b6b2c35a26 100644
--- a/language-reference-guide/docs/system-functions/tkill.md
+++ b/language-reference-guide/docs/system-functions/tkill-monadic.md
@@ -3,9 +3,11 @@ search:
boost: 2
---
-# Kill Thread `{R}←{X}⎕TKILL Y`{{key}}
+# Kill Threads `{R}←⎕TKILL Y`{{key}}
-`Y` must be a simple array of integers representing thread numbers to be terminated. `X` is a Boolean single, defaulting to 1, which indicates that all descendant threads should also be terminated.
+`Y` must be a simple array of integers representing thread numbers to be terminated. All descendant threads are also terminated.
+
+To also kill the descendants of the threads, use [dyadic `⎕TKILL`](tkill-dyadic.md).
The shy result `R` is a vector of the numbers of all threads that have been terminated.
@@ -17,8 +19,6 @@ The **base thread** 0 is always excluded from the cull.
⎕TKILL ⎕TID ⍝ Kill self and descendants.
- 0 ⎕TKILL ⎕TID ⍝ Kill self only.
-
⎕TKILL ⎕TCNUMS ⎕TID ⍝ Kill descendants.
```
diff --git a/language-reference-guide/docs/system-functions/tpool.md b/language-reference-guide/docs/system-functions/tpool.md
index b091f529086..aae60055c0e 100644
--- a/language-reference-guide/docs/system-functions/tpool.md
+++ b/language-reference-guide/docs/system-functions/tpool.md
@@ -24,7 +24,7 @@ The following (`⎕ML=0`) function returns a 2-column snapshot of the contents o
```
-See also: [Querying the Token Pool (Y is 2)](talloc.md).
+See also: [Querying the Token Pool (Y is 2)](talloc-dyadic.md).
diff --git a/language-reference-guide/docs/system-functions/tput-disambiguation.md b/language-reference-guide/docs/system-functions/tput-disambiguation.md
new file mode 100644
index 00000000000..cfab5524754
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/tput-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+#
Put Tokens `⎕TPUT`
+
+## Monadic `⎕TPUT` means
+
+[Put Tokens](tput-monadic.md)
+
+## Dyadic `⎕TPUT` means
+
+[Put Tokens with Values](tput-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/tput.md b/language-reference-guide/docs/system-functions/tput-dyadic.md
similarity index 71%
rename from language-reference-guide/docs/system-functions/tput.md
rename to language-reference-guide/docs/system-functions/tput-dyadic.md
index 26c11c4f76d..2100e56ebca 100644
--- a/language-reference-guide/docs/system-functions/tput.md
+++ b/language-reference-guide/docs/system-functions/tput-dyadic.md
@@ -3,17 +3,18 @@ search:
boost: 2
---
-#
Put Tokens `{R}←{X} ⎕TPUT Y`{{key}}
+#
Put Tokens with Values `{R}←X ⎕TPUT Y`{{key}}
`Y` must be a simple numeric scalar or vector of non-zero token types. Non-integer values in `Y` must fall within a range that has been allocated using `⎕TALLOC`.
-`X` is an optional array of values to be stored in each of the tokens specified by `Y`.
+To put tokens that carry no value, use [monadic `⎕TPUT`](tput-monadic.md).
+
+`X` is an array of values to be stored in each of the tokens specified by `Y`.
Shy result `R` is a vector of thread numbers (if any) unblocked by the `⎕TPUT`.
Examples
```apl
- ⎕TPUT 2 3 2 ⍝ put a 2-token, a 3-token and
another 2-token into the pool.
88 ⎕TPUT 2 ⍝ put another 2-token into the pool
@@ -23,8 +24,6 @@ Shy result `R` is a vector of thread numbers (if any) unblocked by the `⎕TPUT`
with the value 'Hello'.
```
-If `X` is omitted, the *value* associated with each of the tokens added to the pool is the same as its *type*.
-
Note that you cannot put a 0-token into the pool; 0-s are removed from `Y`.
diff --git a/language-reference-guide/docs/system-functions/tput-monadic.md b/language-reference-guide/docs/system-functions/tput-monadic.md
new file mode 100644
index 00000000000..05d9653ab6f
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/tput-monadic.md
@@ -0,0 +1,31 @@
+---
+search:
+ boost: 2
+---
+
+#
Put Tokens `{R}←⎕TPUT Y`{{key}}
+
+`Y` must be a simple numeric scalar or vector of non-zero token types. Non-integer values in `Y` must fall within a range that has been allocated using `⎕TALLOC`.
+
+To store a value in each token, use [dyadic `⎕TPUT`](tput-dyadic.md).
+
+Shy result `R` is a vector of thread numbers (if any) unblocked by the `⎕TPUT`.
+
+
Examples
+```apl
+ ⎕TPUT 2 3 2 ⍝ put a 2-token, a 3-token and
+ another 2-token into the pool.
+
+ this token has the value 88.
+
+ with the value 'Hello'.
+```
+
+The *value* associated with each of the tokens added to the pool is the same as its *type*.
+
+Note that you cannot put a 0-token into the pool; 0-s are removed from `Y`.
+
+
+
+ ⎕TPUT TPUT
+
diff --git a/language-reference-guide/docs/system-functions/ucs-disambiguation.md b/language-reference-guide/docs/system-functions/ucs-disambiguation.md
new file mode 100644
index 00000000000..2ecbdf5aba2
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/ucs-disambiguation.md
@@ -0,0 +1,22 @@
+---
+search:
+ exclude: true
+---
+
+#
Unicode Convert `⎕UCS`
+
+## Monadic `⎕UCS` means
+
+[Convert Unicode Code Point](ucs-monadic.md)
+```apl
+ ⎕UCS 'APL'
+65 80 76
+```
+
+## Dyadic `⎕UCS` means
+
+[Convert Unicode Representation](ucs-dyadic.md)
+```apl
+ 'UTF-8' ⎕UCS '£'
+194 163
+```
diff --git a/language-reference-guide/docs/system-functions/ucs.md b/language-reference-guide/docs/system-functions/ucs-dyadic.md
similarity index 62%
rename from language-reference-guide/docs/system-functions/ucs.md
rename to language-reference-guide/docs/system-functions/ucs-dyadic.md
index d5e3dbb72c5..3fc04b53aed 100644
--- a/language-reference-guide/docs/system-functions/ucs.md
+++ b/language-reference-guide/docs/system-functions/ucs-dyadic.md
@@ -3,11 +3,13 @@ search:
boost: 2
---
-#
Unicode Convert `R←{X} ⎕UCS Y`{{key}}
+#
Convert Unicode Representation `R←X ⎕UCS Y`{{key}}
`⎕UCS` converts (Unicode) characters into integers and vice versa.
-The optional left argument `X` is either a simple character vector or a one- or two-element nested vector. `X` or its first element is the name of a variable-length Unicode encoding scheme and must be one of:
+To convert between characters and Unicode code points, use [monadic `⎕UCS`](ucs-monadic.md).
+
+The left argument `X` is either a simple character vector or a one- or two-element nested vector. `X` or its first element is the name of a variable-length Unicode encoding scheme and must be one of:
- `'UTF-8'`
- `'UTF-16'`
@@ -15,43 +17,9 @@ The optional left argument `X` is either a simple character vector or a one- or
The second element (if present) is either `0` (the default) to consume and return byte values as positive integers or `83` to use 1-byte integers (type 83). `83` can only be used with `'UTF-8'`.
-If `X` does not abide by the above restrictions, a `DOMAIN ERROR` is issued.
-
-If `X` is omitted, `Y` is a simple character or integer array, and the result `R` is a simple integer or character array with the same rank and shape as `Y`.
-
-If `X` is specified, `Y` must be a simple character or integer vector, and the result `R` is a simple integer or character vector.
+If `X` is any other value, a `DOMAIN ERROR` is generated.
-## Monadic `⎕UCS`
-
-Monadic `⎕UCS` converts any character array to a numeric array of the same shape, or any numeric array to a character array of the same shape. When doing this, characters are converted to Unicode code points and Unicode code points are converted to characters.
-
-```apl
-
- ⎕UCS 'Hello World'
-72 101 108 108 111 32 87 111 114 108 100
-
- ⎕UCS 2 11⍴72 101 108 108 111 32 87 111 114 108 100
-Hello World
-Hello World
-```
-
-The code points for the Greek alphabet are situated in the 900's:
-```apl
-
- ⎕UCS 'καλημέρα'
-954 945 955 951 956 941 961 945
-
-```
-
-Unicode also contains the APL character set. For example:
-```apl
-
- ⎕UCS 123 40 43 47 9077 41 247 9076 9077 125
-{(+/⍵)÷⍴⍵}
-
-```
-
-## Dyadic `⎕UCS`
+`Y` must be a simple character or integer vector, and the result `R` is a simple integer or character vector.
Dyadic `⎕UCS` translates between vectors of Unicode characters and one of three standard Unicode encoding schemes – UTF-8, UTF-16, or UTF-32. These represent a character vector as a vector of integers. In the case of UTF-8, the integers can be specified to be unsigned (the default) or signed.
```apl
@@ -69,7 +37,7 @@ Dyadic `⎕UCS` translates between vectors of Unicode characters and one of thre
947 949 953 945 32 963 959 965
```
-### UTF-8 Signed Integers
+## UTF-8 Signed Integers
By default, `⎕UCS` uses unsigned integers. For UTF-8 only, if `X` is `'UTF-8' 83`, `⎕UCS` will instead use signed integers which are then represented as single bytes (type 83). For example:
@@ -89,15 +57,13 @@ This facilitates storing Unicode text in native files as UTF-8. For example:
ABCÆØÅ
```
-### UTF-16 and UCS-2
+## UTF-16 and UCS-2
For most characters in the [first plane of Unicode (0000-FFFF)](https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane), UTF-16 and UCS-2 are identical. However, UTF-16 can encode all Unicode characters by using up to two code units for each character.
```apl
'UTF-16' ⎕UCS 'ABCÆØÅ⍒⍋'
65 66 67 198 216 197 9042 9035
- ⎕←unihan←⎕UCS (2×2*16)+⍳3 ⍝ x20001-x20003
-
'UTF-16' ⎕UCS unihan
55360 56321 55360 56322 55360 56323
```
diff --git a/language-reference-guide/docs/system-functions/ucs-monadic.md b/language-reference-guide/docs/system-functions/ucs-monadic.md
new file mode 100644
index 00000000000..8aac69dee2a
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/ucs-monadic.md
@@ -0,0 +1,49 @@
+---
+search:
+ boost: 2
+---
+
+#
Convert Unicode Code Point `R←⎕UCS Y`{{key}}
+
+`⎕UCS` converts (Unicode) characters into integers and vice versa.
+
+To convert using a named encoding scheme such as UTF-8, use [dyadic `⎕UCS`](ucs-dyadic.md).
+
+`Y` is a simple character or integer array, and the result `R` is a simple integer or character array with the same rank and shape as `Y`.
+
+Monadic `⎕UCS` converts any character array to a numeric array of the same shape, or any numeric array to a character array of the same shape. When doing this, characters are converted to Unicode code points and Unicode code points are converted to characters.
+
+```apl
+
+ ⎕UCS 'Hello World'
+72 101 108 108 111 32 87 111 114 108 100
+
+ ⎕UCS 2 11⍴72 101 108 108 111 32 87 111 114 108 100
+Hello World
+Hello World
+```
+
+The code points for the Greek alphabet are situated in the 900's:
+```apl
+
+ ⎕UCS 'καλημέρα'
+954 945 955 951 956 941 961 945
+
+```
+
+Unicode also contains the APL character set. For example:
+```apl
+
+ ⎕UCS 123 40 43 47 9077 41 247 9076 9077 125
+{(+/⍵)÷⍴⍵}
+
+```
+
+## Translation Error
+
+`⎕UCS` will generate a `DOMAIN ERROR` if the argument cannot be converted. Additionally, in the Classic Edition, a `TRANSLATION ERROR` is generated if the result is not in `⎕AV` or the numeric argument is not in `⎕AVU`.
+
+
+
+ ⎕UCS UCS
+
diff --git a/language-reference-guide/docs/system-functions/vfi-disambiguation.md b/language-reference-guide/docs/system-functions/vfi-disambiguation.md
new file mode 100644
index 00000000000..ce4f8230c74
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/vfi-disambiguation.md
@@ -0,0 +1,22 @@
+---
+search:
+ exclude: true
+---
+
+#
Verify & Fix Input `⎕VFI`
+
+## Monadic `⎕VFI` means
+
+[Parse Numbers](vfi-monadic.md)
+```apl
+ ⎕VFI '1 2 3'
+ 1 1 1 1 2 3
+```
+
+## Dyadic `⎕VFI` means
+
+[Parse Numbers with Separators](vfi-dyadic.md)
+```apl
+ ',' ⎕VFI '1,2,3'
+ 1 1 1 1 2 3
+```
diff --git a/language-reference-guide/docs/system-functions/vfi-dyadic.md b/language-reference-guide/docs/system-functions/vfi-dyadic.md
new file mode 100644
index 00000000000..5f88c3e31e8
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/vfi-dyadic.md
@@ -0,0 +1,29 @@
+---
+search:
+ boost: 2
+---
+
+#
Parse Numbers with Separators `R←X ⎕VFI Y`{{key}}
+
+`Y` must be a simple character scalar or vector. `X` must be a simple character scalar or vector. `R` is a nested vector of length two whose first item is a simple logical vector and whose second item is a simple numeric vector of the same length as the first item of `R`.
+
+To parse with only blanks as separators, use [monadic `⎕VFI`](vfi-monadic.md).
+
+`Y` is the character representation of a series of numeric constants. Leading and trailing blanks and separating blanks in excess of one are redundant and ignored. If `X` is present, `X` specifies one or more alternative separating characters. Blanks in leading and trailing positions in `Y` and between numeric strings separated also by the character(s) in `X` are redundant and ignored. Leading, trailing and adjacent occurrences of the character(s) in `X` are not redundant. The character 0 is implied in `Y` before a leading character, after a trailing character, and between each adjacent pair of characters specified by `X`.
+
+The length of the items of `R` is the same as the number of identifiable strings (or implied strings) in `Y` separated by blank or the value of `X`. An element of the first item of `R` is 1 where the corresponding string in `Y` is a valid numeric representation, or 0 otherwise. An element of the second item of `R` is the numeric value of the corresponding string in `Y` if it is a valid numeric representation, or 0 otherwise.
+
+
Examples
+```apl
+
+ ','⎕VFI'3.9,2.4,,76,'
+ 1 1 1 1 1 3.9 2.4 0 76 0
+
+ '⋄'⎕VFI'1 ⋄ 2 3 ⋄ 4 '
+ 1 0 1 1 0 4
+```
+
+
+
+ ⎕VFI VFI
+
diff --git a/language-reference-guide/docs/system-functions/vfi-monadic.md b/language-reference-guide/docs/system-functions/vfi-monadic.md
new file mode 100644
index 00000000000..827fb9eb74b
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/vfi-monadic.md
@@ -0,0 +1,35 @@
+---
+search:
+ boost: 2
+---
+
+#
Parse Numbers `R←⎕VFI Y`{{key}}
+
+`Y` must be a simple character scalar or vector. `R` is a nested vector of length two whose first item is a simple logical vector and whose second item is a simple numeric vector of the same length as the first item of `R`.
+
+To treat particular characters as separators, use [dyadic `⎕VFI`](vfi-dyadic.md).
+
+`Y` is the character representation of a series of numeric constants. Adjacent numeric strings are separated by one or more blanks. Leading and trailing blanks and separating blanks in excess of one are redundant and ignored. Blanks in leading and trailing positions in `Y` are redundant and ignored. The character 0 is implied in `Y` before a leading character, after a trailing character.
+
+The length of the items of `R` is the same as the number of identifiable strings (or implied strings) in `Y` separated by a blank. An element of the first item of `R` is 1 where the corresponding string in `Y` is a valid numeric representation, or 0 otherwise. An element of the second item of `R` is the numeric value of the corresponding string in `Y` if it is a valid numeric representation, or 0 otherwise.
+
+
Examples
+```apl
+
+ ⎕VFI '2 -2 ¯2'
+ 1 0 1 2 0 ¯2
+
+ ⎕VFI '12.1 1E1 1A1 ¯10'
+ 1 1 0 1 12.1 10 0 ¯10
+
+ ⊃(//⎕VFI'12.1 1E1 1A1 ¯10')
+12.1 10 ¯10
+
+ (⍬ ⍬)≡⎕VFI''
+1
+```
+
+
+
+ ⎕VFI VFI
+
diff --git a/language-reference-guide/docs/system-functions/vfi.md b/language-reference-guide/docs/system-functions/vfi.md
deleted file mode 100644
index eb788f860e4..00000000000
--- a/language-reference-guide/docs/system-functions/vfi.md
+++ /dev/null
@@ -1,38 +0,0 @@
----
-search:
- boost: 2
----
-
-#
Verify & Fix Input `R←{X}⎕VFI Y`{{key}}
-
-`Y` must be a simple character scalar or vector. `X` is optional. If present, `X` must be a simple character scalar or vector. `R` is a nested vector of length two whose first item is a simple logical vector and whose second item is a simple numeric vector of the same length as the first item of `R`.
-
-`Y` is the character representation of a series of numeric constants. If `X` is omitted, adjacent numeric strings are separated by one or more blanks. Leading and trailing blanks and separating blanks in excess of one are redundant and ignored. If `X` is present, `X` specifies one or more alternative separating characters. Blanks in leading and trailing positions in `Y` and between numeric strings separated also by the character(s) in `X` are redundant and ignored. Leading, trailing and adjacent occurrences of the character(s) in `X` are not redundant. The character 0 is implied in `Y` before a leading character, after a trailing character, and between each adjacent pair of characters specified by `X`.
-
-The length of the items of `R` is the same as the number of identifiable strings (or implied strings) in `Y` separated by blank or the value of `X`. An element of the first item of `R` is 1 where the corresponding string in `Y` is a valid numeric representation, or 0 otherwise. An element of the second item of `R` is the numeric value of the corresponding string in `Y` if it is a valid numeric representation, or 0 otherwise.
-
-
Examples
-```apl
-
- ⎕VFI '2 -2 ¯2'
- 1 0 1 2 0 ¯2
-
- ⎕VFI '12.1 1E1 1A1 ¯10'
- 1 1 0 1 12.1 10 0 ¯10
-
- ⊃(//⎕VFI'12.1 1E1 1A1 ¯10')
-12.1 10 ¯10
-
- ','⎕VFI'3.9,2.4,,76,'
- 1 1 1 1 1 3.9 2.4 0 76 0
-
- '⋄'⎕VFI'1 ⋄ 2 3 ⋄ 4 '
- 1 0 1 1 0 4
- (⍬ ⍬)≡⎕VFI''
-1
-```
-
-
-
- ⎕VFI VFI
-
diff --git a/language-reference-guide/docs/system-functions/vget-disambiguation.md b/language-reference-guide/docs/system-functions/vget-disambiguation.md
new file mode 100644
index 00000000000..148ef78011e
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/vget-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+#
Value Get `⎕VGET`
+
+## Monadic `⎕VGET` means
+
+[Get Value from Current Namespace](vget-monadic.md)
+
+## Dyadic `⎕VGET` means
+
+[Get Value from Namespace](vget-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/vget.md b/language-reference-guide/docs/system-functions/vget-dyadic.md
similarity index 72%
rename from language-reference-guide/docs/system-functions/vget.md
rename to language-reference-guide/docs/system-functions/vget-dyadic.md
index b160fbb02e0..824bd0f9cc0 100644
--- a/language-reference-guide/docs/system-functions/vget.md
+++ b/language-reference-guide/docs/system-functions/vget-dyadic.md
@@ -3,7 +3,7 @@ search:
boost: 2
---
-#
Value Get `R←{X}⎕VGET Y`{{key}}
+#
Get Value from Namespace `R←X ⎕VGET Y`{{key}}
`⎕VGET` enables values to be read for names in a source namespace or source namespaces. Optionally, a fallback value can be used if the name requested is undefined.
@@ -15,7 +15,7 @@ search:
All specified names must be either undefined, or have an array value in the source namespace(s). If `Y` specifies a matrix or a vector of names, fallback values to use in cases where a name has no value can also be specified to prevent a `VALUE ERROR` from being generated.
-If specified, `X` must be an array that identifies one or more source namespaces. This means that `X` must be one of:
+`X` must be an array that identifies one or more source namespaces. This means that `X` must be one of:
* a simple character scalar or vector identifying the name of a namespace.
* a reference to a namespace.
@@ -25,11 +25,9 @@ When `X` is an empty array, the prototype of the empty result `R` depends on the
The namespace(s) referenced must already exist, or a `VALUE ERROR` is generated.
-If `X` is not specified, the source namespace is the current namespace.
-
The result `R` depends on the format of `Y`.
-See also [`⎕VSET`](vset.md).
+See also [`⎕VSET`](vset-monadic.md).
## Case 1: Name Matrix
@@ -48,34 +46,6 @@ The result `R` is a vector of the values from the corresponding names or fallbac
Examples
-Multiple names without fallback:
-
-```apl
- (name1 name2 name3 longer_name)←(1 2 3) () 'APL' 42
- names←↑'name1' 'name2' 'name3' 'longer_name'
- names
-name1
-name2
-name3
-longer_name
- ⎕VGET names
- 1 2 3 #.[Namespace] APL 42
-```
-
-Multiple names with a different fallback for each name:
-
-```apl
- name2←100
- names←↑'name1' 'name2' 'name3'
- names
-name1
-name2
-name3
- defaults←1 2 3
- ⎕VGET names defaults
-1 100 3
-```
-
Multiple names with the same fallback for all of them:
```apl
@@ -122,23 +92,6 @@ ABC
ABC DEF
```
-Single name enclosed:
-```apl
- name1←'APL'
- ⎕VGET ⊂'name1'
- APL
- ≢⍴⎕VGET ⊂'name1'
-0
-```
-
-Multiple names without fallback:
-```apl
- (name1 name2 name3)←(1 2 3) () 'APL'
-
- ⎕VGET 'name1' 'name2' 'name3'
- 1 2 3 #.[Namespace] APL
-```
-
Single name with fallback:
```apl
ns←()
@@ -146,32 +99,15 @@ Single name with fallback:
default
```
-Multiple names with fallback for some:
-```apl
- (name1 name2)←'APL' 123
- ⎕VGET ('name1' 1) 'name2' ('name3' 3)
- APL 123 3
- ⎕EX'name1'
- ⎕VGET ('name1' 1) 'name2' ('name3' 3)
-1 123 3
-```
-
-Multiple names with a different fallback for each of them:
-```apl
- name2←100
- ⎕VGET ('name1' 1) ('name2' 2) ('name3' 3)
-1 100 3
-```
-
See [Case 1: Name Matrix](#case-1-name-matrix) for an example of multiple names with the same fallback value for all of them.
## Case 3: Nameclasses
`Y` must be a numeric scalar or vector, where each item is a nameclass (see [Name Classification](nc.md)).
-If any of the numbers in `Y` are negative, the result `R` is a vector of name-value pairs, one for each existing name in the source namespace with a nameclass from `Y`. Otherwise, `R` is a 2-element nested vector, where the first element is a character matrix of names and the second element is a vector of values. In both cases, `R` is suitable as an argument for [`⎕VGET`](vget.md) and [`⎕VSET`](vset.md).
+If any of the numbers in `Y` are negative, the result `R` is a vector of name-value pairs, one for each existing name in the source namespace with a nameclass from `Y`. Otherwise, `R` is a 2-element nested vector, where the first element is a character matrix of names and the second element is a vector of values. In both cases, `R` is suitable as an argument for [`⎕VGET`](vget-monadic.md) and [`⎕VSET`](vset-monadic.md).
-[`⎕NC`](nc.md) always reports the names of fields in a class as having nameclass `2` (`2.2` with the sub-class), even when the name has no value (might expect `0`) or the field is a namespace reference (might expect `9`). [`⎕VGET`](vget.md) with a right argument of `2` will only include fields that have values that are not references, while a right argument of `9` will include fields that are references. With a right argument of `2.2`, [`⎕VGET`](vget.md) will return all fields that are not undefined.
+[`⎕NC`](nc.md) always reports the names of fields in a class as having nameclass `2` (`2.2` with the sub-class), even when the name has no value (might expect `0`) or the field is a namespace reference (might expect `9`). [`⎕VGET`](vget-monadic.md) with a right argument of `2` will only include fields that have values that are not references, while a right argument of `9` will include fields that are references. With a right argument of `2.2`, [`⎕VGET`](vget-monadic.md) will return all fields that are not undefined.
Examples
Name value pairs:
@@ -212,20 +148,6 @@ DOMAIN ERROR: Divide by zero
Vendor Dyalog
```
-Name matrix and value vector:
-
-```apl
- ]Boxing on
-Was OFF
- (name1 name2 name3)←'APL' (1 2 3) ⎕SE
- ⎕VGET 2 9
-┌─────┬─────────────────┐
-│name1│┌───┬─────┬─────┐│
-│name2││APL│1 2 3│ ⎕SE ││
-│name3│└───┴─────┴─────┘│
-└─────┴─────────────────┘
-```
-
⎕VGET VGET
diff --git a/language-reference-guide/docs/system-functions/vget-monadic.md b/language-reference-guide/docs/system-functions/vget-monadic.md
new file mode 100644
index 00000000000..7494d238305
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/vget-monadic.md
@@ -0,0 +1,144 @@
+---
+search:
+ boost: 2
+---
+
+#
Get Value from Current Namespace `R←⎕VGET Y`{{key}}
+
+`⎕VGET` enables values to be read for names in a source namespace or source namespaces. Optionally, a fallback value can be used if the name requested is undefined.
+
+To read the values from one or more explicitly identified namespaces, use [dyadic `⎕VGET`](vget-dyadic.md).
+
+`Y` specifies the names. It must be one of the following:
+
+* a matrix of names or a matrix of names and a value vector – see [Case 1: Name Matrix](#case-1-name-matrix).
+* a vector of names or name-value pairs – see [Case 2: Vector of Names](#case-2-vector-of-names).
+* a vector of nameclasses – see [Case 3: Nameclasses](#case-3-nameclasses).
+
+All specified names must be either undefined, or have an array value in the source namespace(s). If `Y` specifies a matrix or a vector of names, fallback values to use in cases where a name has no value can also be specified to prevent a `VALUE ERROR` from being generated.
+
+The source namespace is the current namespace.
+
+The result `R` depends on the format of `Y`.
+
+See also [`⎕VSET`](vset-monadic.md).
+
+## Case 1: Name Matrix
+
+Names are specified as rows in a character matrix.
+`Y` must be either:
+
+* a character matrix, where each row is a name.
+* a two element vector, where the first item is a character matrix of names and the second item is a specification of fallback values.
+
+The fallback values must be one of the following:
+
+* a vector with as many elements as there are names in the matrix.
+* a scalar value that is the fallback value for all names.
+
+The result `R` is a vector of the values from the corresponding names or fallback values.
+
+
Examples
+
+Multiple names without fallback:
+
+```apl
+ (name1 name2 name3 longer_name)←(1 2 3) () 'APL' 42
+ names←↑'name1' 'name2' 'name3' 'longer_name'
+ names
+name1
+name2
+name3
+longer_name
+ ⎕VGET names
+ 1 2 3 #.[Namespace] APL 42
+```
+
+Multiple names with a different fallback for each name:
+
+```apl
+ name2←100
+ names←↑'name1' 'name2' 'name3'
+ names
+name1
+name2
+name3
+ defaults←1 2 3
+ ⎕VGET names defaults
+1 100 3
+```
+
+## Case 2: Vector of Names
+
+Names are specified as character vectors or scalars. `Y` must be one of the following:
+
+* a single name: `R` is the value of that name in the source namespace.
+* a single enclosed name: `R` is also the value of the name, but enclosed.
+* a single enclosed name-value pair, which is a two-element vector consisting of a character vector name and a fallback value for that name: `R` is the value of the name, or the fallback value in case the name has no value.
+* a nested vector where each item is either a name, or a name value pair: `R` is a vector with the same length as `Y`, with the values from the corresponding names, or fallback values.
+
+
Examples
+
+Single name enclosed:
+```apl
+ name1←'APL'
+ ⎕VGET ⊂'name1'
+ APL
+ ≢⍴⎕VGET ⊂'name1'
+0
+```
+
+Multiple names without fallback:
+```apl
+ (name1 name2 name3)←(1 2 3) () 'APL'
+
+ ⎕VGET 'name1' 'name2' 'name3'
+ 1 2 3 #.[Namespace] APL
+```
+
+Multiple names with fallback for some:
+```apl
+ (name1 name2)←'APL' 123
+ ⎕VGET ('name1' 1) 'name2' ('name3' 3)
+ APL 123 3
+ ⎕EX'name1'
+ ⎕VGET ('name1' 1) 'name2' ('name3' 3)
+1 123 3
+```
+
+Multiple names with a different fallback for each of them:
+```apl
+ name2←100
+ ⎕VGET ('name1' 1) ('name2' 2) ('name3' 3)
+1 100 3
+```
+
+See [Case 1: Name Matrix](#case-1-name-matrix) for an example of multiple names with the same fallback value for all of them.
+
+## Case 3: Nameclasses
+
+`Y` must be a numeric scalar or vector, where each item is a nameclass (see [Name Classification](nc.md)).
+
+If any of the numbers in `Y` are negative, the result `R` is a vector of name-value pairs, one for each existing name in the source namespace with a nameclass from `Y`. Otherwise, `R` is a 2-element nested vector, where the first element is a character matrix of names and the second element is a vector of values. In both cases, `R` is suitable as an argument for [`⎕VGET`](vget-monadic.md) and [`⎕VSET`](vset-monadic.md).
+
+[`⎕NC`](nc.md) always reports the names of fields in a class as having nameclass `2` (`2.2` with the sub-class), even when the name has no value (might expect `0`) or the field is a namespace reference (might expect `9`). [`⎕VGET`](vget-monadic.md) with a right argument of `2` will only include fields that have values that are not references, while a right argument of `9` will include fields that are references. With a right argument of `2.2`, [`⎕VGET`](vget-monadic.md) will return all fields that are not undefined.
+
+
Examples
+Name matrix and value vector:
+
+```apl
+ ]Boxing on
+Was OFF
+ (name1 name2 name3)←'APL' (1 2 3) ⎕SE
+ ⎕VGET 2 9
+┌─────┬─────────────────┐
+│name1│┌───┬─────┬─────┐│
+│name2││APL│1 2 3│ ⎕SE ││
+│name3│└───┴─────┴─────┘│
+└─────┴─────────────────┘
+```
+
+
+
+ ⎕VGET VGET
+
diff --git a/language-reference-guide/docs/system-functions/vset-disambiguation.md b/language-reference-guide/docs/system-functions/vset-disambiguation.md
new file mode 100644
index 00000000000..94094e87063
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/vset-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+#
Value Set `⎕VSET`
+
+## Monadic `⎕VSET` means
+
+[Set Value in Current Namespace](vset-monadic.md)
+
+## Dyadic `⎕VSET` means
+
+[Set Value in Namespace](vset-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/vset-dyadic.md b/language-reference-guide/docs/system-functions/vset-dyadic.md
new file mode 100644
index 00000000000..db2022b1dc4
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/vset-dyadic.md
@@ -0,0 +1,55 @@
+---
+search:
+ boost: 2
+---
+
+#
Set Value in Namespace `{R}←X ⎕VSET Y`{{key}}
+
+`⎕VSET` enables values to be set for names in a target namespace or target namespaces.
+
+To set values in the current namespace, use [monadic `⎕VSET`](vset-monadic.md).
+
+`Y` specifies the names and the values to set for them. It must be one of the following:
+
+* a nested vector or scalar, where each element is a name-value pair. The name must be a simple character vector.
+* a two-element nested array, where the first element is a matrix of names and the second element is a vector or scalar of value(s). If multiple names are specified and the value is a scalar, the same value is used for all names.
+
+All names must have nameclass 0, 2, 8 or 9 in the target namespace(s). For more information on nameclasses, see [`⎕NC`](nc.md).
+
+`X` must be an array that references one or more namespaces. This means that `X` must be one of:
+
+* a simple character scalar or vector identifying the name of a namespace.
+* a reference to a namespace.
+* an array in which each item is one of the above. If `X` refers to multiple namespaces, then `⎕VSET` processes each item of `X` in ravel order, using the entire right argument `Y`; this is equivalent to `X ⎕VSET¨⊂Y`.
+
+The namespace(s) referenced must already exist, or a `VALUE ERROR` is generated.
+
+The result `R` is a shy reference to the target namespace(s).
+
+See also [`⎕VGET`](vget-monadic.md).
+
+## Examples
+
+Name value pairs:
+
+```apl
+ name1
+123
+ name2
+1 2 hello
+
+ (ns1 ns2 ns3)←()()()
+ ns1 'ns2' ns3 ⎕VSET ('X1' 'X value') ('Y1' 'Y value')
+ (ns1 ns2 ns3).(X1 Y1)
+ X value Y value X value Y value X value Y value
+```
+
+## Variant Option: Trigger
+
+The `Trigger` variant option specifies whether any [triggers](../../../programming-reference-guide/triggers/triggers) should be run for the modified variables in the target namespace that have triggers attached.
+The value must be a Boolean scalar. The default is `1`, meaning that triggers are run.
+
+
+
+ ⎕VSET VSET
+
diff --git a/language-reference-guide/docs/system-functions/vset.md b/language-reference-guide/docs/system-functions/vset-monadic.md
similarity index 80%
rename from language-reference-guide/docs/system-functions/vset.md
rename to language-reference-guide/docs/system-functions/vset-monadic.md
index 121a7695e4d..90f1c5720be 100644
--- a/language-reference-guide/docs/system-functions/vset.md
+++ b/language-reference-guide/docs/system-functions/vset-monadic.md
@@ -3,10 +3,12 @@ search:
boost: 2
---
-#
Value Set `{R}←{X}⎕VSET Y`{{key}}
+#
Set Value in Current Namespace `{R}←⎕VSET Y`{{key}}
`⎕VSET` enables values to be set for names in a target namespace or target namespaces.
+To set values in one or more identified namespaces, use [dyadic `⎕VSET`](vset-dyadic.md).
+
`Y` specifies the names and the values to set for them. It must be one of the following:
* a nested vector or scalar, where each element is a name-value pair. The name must be a simple character vector.
@@ -14,19 +16,13 @@ search:
All names must have nameclass 0, 2, 8 or 9 in the target namespace(s). For more information on nameclasses, see [`⎕NC`](nc.md).
-If specified, `X` must be an array that references one or more namespaces. This means that `X` must be one of:
-
-* a simple character scalar or vector identifying the name of a namespace.
-* a reference to a namespace.
-* an array in which each item is one of the above. If `X` refers to multiple namespaces, then `⎕VSET` processes each item of `X` in ravel order, using the entire right argument `Y`; this is equivalent to `X ⎕VSET¨⊂Y`.
-
The namespace(s) referenced must already exist, or a `VALUE ERROR` is generated.
-If `X` is not specified, the target namespace is the current namespace.
+The target namespace is the current namespace.
The result `R` is a shy reference to the target namespace(s).
-See also [`⎕VGET`](vget.md).
+See also [`⎕VGET`](vget-monadic.md).
## Examples
@@ -40,7 +36,6 @@ Name value pairs:
1 2 hello
(ns1 ns2 ns3)←()()()
- ns1 'ns2' ns3 ⎕VSET ('X1' 'X value') ('Y1' 'Y value')
(ns1 ns2 ns3).(X1 Y1)
X value Y value X value Y value X value Y value
```
diff --git a/language-reference-guide/docs/system-functions/wc-disambiguation.md b/language-reference-guide/docs/system-functions/wc-disambiguation.md
new file mode 100644
index 00000000000..2dcbc6b5752
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/wc-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+#
Window Create Object `⎕WC`
+
+## Monadic `⎕WC` means
+
+[Convert Namespace to GUI Object](wc-monadic.md)
+
+## Dyadic `⎕WC` means
+
+[Create GUI Object](wc-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/wc.md b/language-reference-guide/docs/system-functions/wc-dyadic.md
similarity index 93%
rename from language-reference-guide/docs/system-functions/wc.md
rename to language-reference-guide/docs/system-functions/wc-dyadic.md
index 91f85bce34b..5b687da792f 100644
--- a/language-reference-guide/docs/system-functions/wc.md
+++ b/language-reference-guide/docs/system-functions/wc-dyadic.md
@@ -3,13 +3,13 @@ search:
boost: 2
---
-#
Window Create Object `{R}←{X}⎕WC Y`{{key}}
+#
Create GUI Object `{R}←X ⎕WC Y`{{key}}
**Windows only.**
This system function creates a GUI **object**. `Y` is either a vector which specifies **properties** that determine the new object's appearance and behaviour, or a ref to or the `⎕OR` of a GUI object that exists or previously existed. `X` is a character vector which specifies the name of the new object, and its position in the object hierarchy.
-If `X` is omitted, `⎕WC` attaches a GUI component to the current namespace, retaining any functions, variables and other namespaces that it may contain. Monadic `⎕WC` is discussed in detail at the end of this section.
+To create the object in the current namespace, use [monadic `⎕WC`](wc-monadic.md).
If `Y` is a nested vector each element specifies a property. The `Type` property (which specifies the class of the object) **must** be specified. Most other properties take default values and need not be explicitly stated. Properties (including `Type`) may be declared either positionally or with a keyword followed by a value. Note that `Type` must always be the first property specified. Properties are specified positionally by placing their values in `Y` in the order prescribed for an object of that type.
@@ -98,8 +98,6 @@ Monadic `⎕WC` is used to *attach* a GUI component to an existing object. The
```apl
)CS F
#.F
- ⎕WC 'Form' ⍝ Attach a Form to this namespace
-
)CS
#
F.⎕WC'Form' ⍝ Attach a Form to namespace F
diff --git a/language-reference-guide/docs/system-functions/wc-monadic.md b/language-reference-guide/docs/system-functions/wc-monadic.md
new file mode 100644
index 00000000000..9ffc0aa4ac6
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/wc-monadic.md
@@ -0,0 +1,56 @@
+---
+search:
+ boost: 2
+---
+
+#
Convert Namespace to GUI Object `{R}←⎕WC Y`{{key}}
+
+**Windows only.**
+
+This system function creates a GUI **object**. `Y` is either a vector which specifies **properties** that determine the new object's appearance and behaviour, or a ref to or the `⎕OR` of a GUI object that exists or previously existed.
+
+To give the new object a name and position in the object hierarchy, use [dyadic `⎕WC`](wc-dyadic.md).
+
+`⎕WC` attaches a GUI component to the current namespace, retaining any functions, variables and other namespaces that it can contain. Monadic `⎕WC` is discussed in detail at the end of this section.
+
+If `Y` is a nested vector each element specifies a property. The `Type` property (which specifies the class of the object) **must** be specified. Most other properties take default values and need not be explicitly stated. Properties (including `Type`) may be declared either positionally or with a keyword followed by a value. Note that `Type` must always be the first property specified. Properties are specified positionally by placing their values in `Y` in the order prescribed for an object of that type.
+
+If `Y` is a ref or the result of `⎕OR`, the new object is a complete copy of the other, including any child objects, namespaces, functions and variables that it contained at that time.
+
+The shy result `R` is the full name (starting `#.` or `⎕SE`.) of the namespace.
+
+An object's name is specified by giving its full pathname in the object hierarchy. At the top of the hierarchy is the `Root` object whose name is "`.`". Below "`.`" there may be one or more "top-level" objects. The names of these objects follow the standard rules for other APL objects as described in [Legal Names](../../../programming-reference-guide/introduction/names)
+
+Names for sub-objects follow the same rules except that the character "`.`" is used as a delimiter to indicate parent/child relationships.
+
+The following are examples of legal and illegal names:
+
+|Legal |Illegal |
+|-----------|---------|
+|`FORM1` |`FORM 1` |
+|`form_23` |`form#1` |
+|`Form1.Gp` |`11_Form`|
+|`F1.g2.b34`|`Form+1` |
+
+If `Y` refers to a non-existent property, or to a property that is not defined for the type of the object, a `DOMAIN ERROR` is reported. A `DOMAIN ERROR` is also reported if a value is given that is inconsistent with the corresponding property. This can occur for example, if `Y` specifies values positionally and in the wrong order.
+
+A "top-level" object created by `⎕WC` whose name is localised in a function/operator header, is deleted on exit from the function/operator. All objects, including sub-objects, can be deleted using `⎕EX`.
+
+GUI objects are named **relative** to the current namespace.
+
+
Examples
+
+Monadic `⎕WC` is used to *attach* a GUI component to an existing object. The existing object must be a pure namespace or a GUI object. The operation may be performed by changing space to the object or by running `⎕WC` *inside* the object using the *dot* syntax. For example, the following statements are equivalent.
+```apl
+ )CS F
+#.F
+ ⎕WC 'Form' ⍝ Attach a Form to this namespace
+
+ )CS
+#
+```
+
+
+
+ ⎕WC WC
+
diff --git a/language-reference-guide/docs/system-functions/wg-disambiguation.md b/language-reference-guide/docs/system-functions/wg-disambiguation.md
new file mode 100644
index 00000000000..b41bc8b5567
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/wg-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+#
Window Get Property `⎕WG`
+
+## Monadic `⎕WG` means
+
+[Get Properties of Current GUI Object](wg-monadic.md)
+
+## Dyadic `⎕WG` means
+
+[Get Properties of GUI Object](wg-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/wg.md b/language-reference-guide/docs/system-functions/wg-dyadic.md
similarity index 84%
rename from language-reference-guide/docs/system-functions/wg.md
rename to language-reference-guide/docs/system-functions/wg-dyadic.md
index f13f7980e53..32cffd3b43c 100644
--- a/language-reference-guide/docs/system-functions/wg.md
+++ b/language-reference-guide/docs/system-functions/wg-dyadic.md
@@ -3,17 +3,19 @@ search:
boost: 2
---
-#
Window Get Property `R←{X}⎕WG Y`{{key}}
+#
Get Properties of GUI Object `R←X ⎕WG Y`{{key}}
**Windows only.**
This system function returns property values for a GUI object.
+To read the properties of the current object, use [monadic `⎕WG`](wg-monadic.md).
+
`X` is a namespace reference or a character vector containing the name of the object. `Y` is a character vector or a vector of character vectors containing the name(s) of the properties whose values are required. The result `R` contains the current values of the specified properties. If `Y` specifies a single property name, a single property value is returned. If `Y` specifies more than one property, `R` is a vector with one element per name in `Y`.
If `X` refers to a non-existent GUI name, a `VALUE ERROR` is reported. If `Y` refers to a non-existent property, or to a property that is not defined for the type of object `X`, a `DOMAIN ERROR` is reported.
-GUI objects are named **relative** to the current namespace. A null value of `X` (referring to the namespace in which the function is being evaluated) may be omitted. The following examples are equivalent:
+GUI objects are named **relative** to the current namespace. A null value of `X` refers to the namespace in which the function is being evaluated. The following examples are equivalent:
```apl
'F1.B1' ⎕WG 'Caption'
diff --git a/language-reference-guide/docs/system-functions/wg-monadic.md b/language-reference-guide/docs/system-functions/wg-monadic.md
new file mode 100644
index 00000000000..dd57115fa99
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/wg-monadic.md
@@ -0,0 +1,23 @@
+---
+search:
+ boost: 2
+---
+
+#
Get Properties of Current GUI Object `R←⎕WG Y`{{key}}
+
+**Windows only.**
+
+This system function returns property values for a GUI object.
+
+To read the properties of a named object, use [dyadic `⎕WG`](wg-dyadic.md).
+
+The object is the one in the namespace in which the function is being evaluated. `Y` is a character vector or a vector of character vectors containing the name(s) of the properties whose values are required. The result `R` contains the current values of the specified properties. If `Y` specifies a single property name, a single property value is returned. If `Y` specifies more than one property, `R` is a vector with one element per name in `Y`.
+
+If `Y` refers to a non-existent property, or to a property that is not defined for the type of the object, a `DOMAIN ERROR` is reported.
+
+GUI objects are named **relative** to the current namespace. The following examples are equivalent:
+
+
+
+ ⎕WG WG
+
diff --git a/language-reference-guide/docs/system-functions/wn-disambiguation.md b/language-reference-guide/docs/system-functions/wn-disambiguation.md
new file mode 100644
index 00000000000..3cdf4299be9
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/wn-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+#
Window Child Names `⎕WN`
+
+## Monadic `⎕WN` means
+
+[Get GUI Child Names in Current Object](wn-monadic.md)
+
+## Dyadic `⎕WN` means
+
+[Get GUI Child Names in Parent Object](wn-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/wn-dyadic.md b/language-reference-guide/docs/system-functions/wn-dyadic.md
new file mode 100644
index 00000000000..46b2cfcd8ae
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/wn-dyadic.md
@@ -0,0 +1,46 @@
+---
+search:
+ boost: 2
+---
+
+#
Get GUI Child Names in Parent Object `R←X ⎕WN Y`{{key}}
+
+**Windows only.**
+
+This system function reports the GUI objects whose parent is `Y`.
+
+To report children of every type, use [monadic `⎕WN`](wn-monadic.md).
+
+If `Y` is a name (that is, is a character vector) then the result `R` is a vector of character vectors containing the names of the named direct GUI children of `Y`.
+
+If `Y` is a reference then the result `R` is a vector of references to the direct GUI children of `Y`, named or otherwise.
+
+The left argument `X` is a character vector which specifies the `Type` of GUI object to be reported.
+
+Names of objects further down the tree are not returned, but can be obtained by recursive use of `⎕WN`.
+
+If `Y` refers to a namespace with no GUI element, a `VALUE ERROR` is reported.
+
+Note that `⎕WN` reports **only** those child objects visible from the current thread.
+
+GUI objects are named **relative** to the current namespace. The following examples are equivalent:
+```apl
+ F1.⎕WN 'B1'
+ F1.B1.⎕WN ''
+```
+
+
Example
+```apl
+ f←⎕NEW⊂'Form'
+ f.n←⎕NS'' ⍝ A non-GUI object
+ f.l←f.⎕NEW⊂'Label' ⍝ A reference to a Label
+ 'f.b1'⎕WC'Button' ⍝ A named Button
+ f.(b2←⎕NEW ⊂'Button') ⍝ A reference to a Button
+ 'Button' ⎕WN f
+ #.[Form].b1 #.[Form].[Button]
+```
+
+
+
+ ⎕WN WN
+
diff --git a/language-reference-guide/docs/system-functions/wn.md b/language-reference-guide/docs/system-functions/wn-monadic.md
similarity index 79%
rename from language-reference-guide/docs/system-functions/wn.md
rename to language-reference-guide/docs/system-functions/wn-monadic.md
index a375cc97f69..df618348bce 100644
--- a/language-reference-guide/docs/system-functions/wn.md
+++ b/language-reference-guide/docs/system-functions/wn-monadic.md
@@ -3,17 +3,19 @@ search:
boost: 2
---
-#
Window Child Names `R←{X}⎕WN Y`{{key}}
+#
Get GUI Child Names in Current Object `R←⎕WN Y`{{key}}
**Windows only.**
This system function reports the GUI objects whose parent is `Y`.
+To report only the children of a particular type, use [dyadic `⎕WN`](wn-dyadic.md).
+
If `Y` is a name (that is, is a character vector) then the result `R` is a vector of character vectors containing the names of the named direct GUI children of `Y`.
If `Y` is a reference then the result `R` is a vector of references to the direct GUI children of `Y`, named or otherwise.
-The optional left argument `X` is a character vector which specifies the `Type` of GUI object to be reported; if `X` is not specified, no such filtering is performed.
+No filtering by the `Type` of GUI object is performed.
Names of objects further down the tree are not returned, but can be obtained by recursive use of `⎕WN`.
@@ -24,8 +26,6 @@ Note that `⎕WN` reports **only** those child objects visible from the current
GUI objects are named **relative** to the current namespace. The following examples are equivalent:
```apl
⎕WN 'F1.B1'
- F1.⎕WN 'B1'
- F1.B1.⎕WN ''
```
Example
@@ -39,8 +39,6 @@ GUI objects are named **relative** to the current namespace. The following exa
[Form].b1
⎕WN f
#.[Form].[Label] #.[Form].b1 #.[Form].[Button]
- 'Button' ⎕WN f
- #.[Form].b1 #.[Form].[Button]
```
diff --git a/language-reference-guide/docs/system-functions/ws-disambiguation.md b/language-reference-guide/docs/system-functions/ws-disambiguation.md
new file mode 100644
index 00000000000..9c03ec39276
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/ws-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+#
Window Set Property `⎕WS`
+
+## Monadic `⎕WS` means
+
+[Set Properties of Current GUI Object](ws-monadic.md)
+
+## Dyadic `⎕WS` means
+
+[Set Properties of GUI Object](ws-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/ws.md b/language-reference-guide/docs/system-functions/ws-dyadic.md
similarity index 85%
rename from language-reference-guide/docs/system-functions/ws.md
rename to language-reference-guide/docs/system-functions/ws-dyadic.md
index 6bb1156e406..39e3828e243 100644
--- a/language-reference-guide/docs/system-functions/ws.md
+++ b/language-reference-guide/docs/system-functions/ws-dyadic.md
@@ -3,19 +3,21 @@ search:
boost: 2
---
-#
Window Set Property `{R}←{X}⎕WS Y`{{key}}
+#
Set Properties of GUI Object `{R}←X ⎕WS Y`{{key}}
**Windows only.**
This system function resets property values for a GUI object.
+To set the properties of the current object, use [monadic `⎕WS`](ws-monadic.md).
+
`X` is a namespace reference or a character vector containing the name of the object. `Y` defines the property or properties to be changed and the new value or values. If a single property is to be changed, `Y` is a vector whose first element `Y[1]` is a character vector containing the property name. If `Y` is of length 2, `Y[2]` contains the corresponding property value. However, if the property value is itself a numeric or nested vector, its elements may be specified in `Y[2 3 4 ...]` instead of as a single nested element in `Y[2]`. If `Y` specifies more than one property, they may be declared either positionally or with a keyword followed by a value. Properties are specified positionally by placing their values in `Y` in the order prescribed for an object of that type. Note that the first property in `Y` must always be specified with a keyword because the `Type` property (which is expected first) may not be changed using `⎕WS`.
If `X` refers to a non-existent GUI name, a `VALUE ERROR` is reported. If `Y` refers to a non-existent property, or to a property that is not defined for the type of object `X`, or to a property whose value may not be changed by `⎕WS`, a `DOMAIN ERROR` is reported.
The shy result `R` contains the previous values of the properties specified in `Y`.
-GUI objects are named **relative** to the current namespace. A null value of `X` (referring to the namespace in which the function is being evaluated) may be omitted. The following examples are equivalent:
+GUI objects are named **relative** to the current namespace. A null value of `X` refers to the namespace in which the function is being evaluated. The following examples are equivalent:
```apl
'F1.B1' ⎕WS 'Caption' '&Ok'
'B1' F1.⎕WS 'Caption' '&Ok'
diff --git a/language-reference-guide/docs/system-functions/ws-monadic.md b/language-reference-guide/docs/system-functions/ws-monadic.md
new file mode 100644
index 00000000000..47caa6c3cb8
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/ws-monadic.md
@@ -0,0 +1,25 @@
+---
+search:
+ boost: 2
+---
+
+#
Set Properties of Current GUI Object `{R}←⎕WS Y`{{key}}
+
+**Windows only.**
+
+This system function resets property values for a GUI object.
+
+To set the properties of a named object, use [dyadic `⎕WS`](ws-dyadic.md).
+
+The object is the one in the namespace in which the function is being evaluated. `Y` defines the property or properties to be changed and the new value or values. If a single property is to be changed, `Y` is a vector whose first element `Y[1]` is a character vector containing the property name. If `Y` is of length 2, `Y[2]` contains the corresponding property value. However, if the property value is itself a numeric or nested vector, its elements may be specified in `Y[2 3 4 ...]` instead of as a single nested element in `Y[2]`. If `Y` specifies more than one property, they may be declared either positionally or with a keyword followed by a value. Properties are specified positionally by placing their values in `Y` in the order prescribed for an object of that type. Note that the first property in `Y` must always be specified with a keyword because the `Type` property (which is expected first) may not be changed using `⎕WS`.
+
+If `Y` refers to a non-existent property, or to a property that is not defined for the type of the object, or to a property whose value may not be changed by `⎕WS`, a `DOMAIN ERROR` is reported.
+
+The shy result `R` contains the previous values of the properties specified in `Y`.
+
+GUI objects are named **relative** to the current namespace. The following examples are equivalent:
+
+
+
+ ⎕WS WS
+
diff --git a/language-reference-guide/docs/system-functions/xml-disambiguation.md b/language-reference-guide/docs/system-functions/xml-disambiguation.md
new file mode 100644
index 00000000000..ac8879f2f58
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/xml-disambiguation.md
@@ -0,0 +1,14 @@
+---
+search:
+ exclude: true
+---
+
+#
XML Convert `⎕XML`
+
+## Monadic `⎕XML` means
+
+[Convert XML](xml-monadic.md)
+
+## Dyadic `⎕XML` means
+
+[Custom Convert XML](xml-dyadic.md)
diff --git a/language-reference-guide/docs/system-functions/xml-dyadic.md b/language-reference-guide/docs/system-functions/xml-dyadic.md
new file mode 100644
index 00000000000..a127a01b471
--- /dev/null
+++ b/language-reference-guide/docs/system-functions/xml-dyadic.md
@@ -0,0 +1,243 @@
+---
+search:
+ boost: 2
+---
+
+#
Custom Convert XML `R←X ⎕XML Y`{{key}}
+
+`⎕XML` converts an XML string into an APL array or converts an APL array into an XML string.
+
+Specifying options with the Variant operator `⍠` on [monadic `⎕XML`](xml-monadic.md) is recommended instead.
+
+Options for `⎕XML` are specified using the Variant operator `⍠` or by the left argument `X`. The former is recommended but the older mechanism using the left argument is still supported.
+
+For conversion *from* XML, `Y` is a character vector containing an XML string. The result `R` is a 5 column matrix whose columns are made up as follows:
+
+|Column|Description |
+|------|---------------------------------------------------------------------|
+|1 |Numeric value which indicates the level of nesting |
+|2 |Element name, other markup text, or empty character vector when empty|
+|3 |Character data or empty character vector when empty |
+|4 |Attribute name and value pairs, ( `0 2⍴⊂''` ) when empty |
+|5 |A numeric value which indicates what the row contains |
+
+The values in column 5 have the following meanings:
+
+|Value|Description |
+|-----|-----------------------------|
+|1 |Element |
+|2 |Child element |
+|4 |Character data |
+|8 |Markup not otherwise defined |
+|16 |Comment markup |
+|32 |Processing instruction markup|
+
+These values are additive. For example, a value of 5 in column 5 means that the row contains both an element (value 1) and character data (value 4).
+
+
Example
+```apl
+ x←'
An introduction to XML'
+ x,←''
+```
+
+For conversion *to* XML, `Y` is a 3, 4 or 5 column matrix and the result `R` is a character vector. The columns of `Y` have the same meaning as those described above for the result of converting *from* XML.
+
+## Introduction to XML and Glossary of Terms
+
+XML is an open standard, designed to allow exchange of data between applications. The [full specification](http://www.w3.org/TR/2008/REC-xml-20081126/) describes functionality, including processing directives and other directives, which can transform XML data as it is read, and which a full XML processor would be expected to handle.
+
+The `⎕XML` function is designed to handle XML to the extent required to import and export APL data. It favours speed over complexity - some markup is tolerated but largely ignored, and there are no XML query or validation features. APL applications which require processing, querying or validation will need to call external tools for this, and finally call `⎕XML` on the resulting XML to perform the transformation into APL arrays.
+
+XML grammar such as processing instructions, document type declarations etc. may optionally be stored in the APL array, but will not be processed or validated. This is principally to allow regeneration of XML from XML input which contains such structures, but an APL application could process the data if it chose to do so.
+
+The XML definition uses specific terminology to describe its component parts. The following is a summary of the terms used in this section:
+
+### Character Data
+
+Character data consists of free-form text. The free-form text should not include the characters '>', '<' or '&', so these must be represented by their entity references ('>', '<' and '&' respectively), or numeric character references.
+
+### Entity References and Character References
+
+Entity references are named representations of single characters which cannot normally be used in character data because they are used to delimit markup, such as > for '>'. Character references are numeric representations of any character, such as for space. Note that character references always take values in the Unicode code space, regardless of the encoding of the XML text itself.
+
+`⎕XML` converts entity references and all character references which the APL character set is able to represent into their character equivalent when generating APL array data; when generating XML it converts any or all characters to entity references as needed.
+
+There is a predefined set of entity references, and the XML specification allows others to be defined within the XML using the `` markup. `⎕XML` does not process these additional declarations and therefore will only convert the predefined types.
+
+### Whitespace
+
+Whitespace sequences consist of one or more spaces, tabs or line-endings. Within character data, sequences of one or more whitespace characters are replaced with a single space when this is enabled by the whitespace option. Line endings are represented differently on different systems (0x0D 0x0A, 0x0A and 0x0D are all used) but are normalized by converting them all to 0x0A before the XML is parsed, regardless of the setting of the whitespace option.
+
+### Elements
+
+An element consists of a balanced pair of tags or a single empty element tag. Tags are given names, and start and end tag names must match.
+
+An example pair of tags, named TagName is
+
+`
`
+
+This pair is shown with no content between the tags; this may be abbreviated as an empty element tag as
+
+`
`
+
+Tags may be given zero or more attributes, which are specified as name/value pairs; for example
+
+`
`
+
+Attribute values may be delimited by either double quotes as shown or single quotes (apostrophes); they may not contain certain characters (the delimiting quote, '&' or '<') and these must be represented by entity or character references.
+
+The content of elements may be zero or more mixed occurrences of character data and nested elements. Tags and attribute names *describe* data, attribute values and the content within tags contain the data itself. Nesting of elements allows structure to be defined.
+
+Because certain markup which describes the format of allowable data (such as element type declarations and attribute-list declarations) is not processed, no error will be reported if element contents and attributes do not conform to their restricted declarations, nor are attributes automatically added to tags if not explicitly given.
+
+Attributes with names beginning **xml:** are reserved. Only **xml:space** is treated specially by `⎕XML`. When converting both from and to XML, the value for this attribute has the following effects on space normalization for the character data within this element and child elements within it (unless subsequently overridden):
+
+- **default** – space normalization is as determined by the **whitespace** option.
+- **preserve** - space normalization is disabled – all whitespace is preserved as given.
+- **any other value** – rejected.
+
+Regardless of whether the attribute name and value have a recognised meaning, the attribute will be included in the APL array / generated XML. Note that when the names and values of attributes are examined, the comparisons are case-sensitive and take place after entity references and character references have been expanded.
+
+### Comments
+
+Comments are fully supported markup. They are delimited by '' and all text between these delimiters is ignored. This text is included in the APL array if markup is being preserved, or discarded otherwise.
+
+### CDATA Sections
+
+CDATA Sections are fully supported markup. They are used to delimit text within character data which has, or may have, markup text in it which is not to be processed as such. They and are delimited by ''. CDATA sections are never recorded in the APL array as markup when XML is processed – instead, that data appears as character data. Note that this means that if you convert XML to an APL array and then convert this back to XML, CDATA sections will not be regenerated. It is, however, *possible* to generate CDATA sections in XML by presenting them as markup.
+
+### Processing Instructions
+
+Processing Instructions are delimited by '<&' and '&>' but are otherwise treated as other markup, below.
+
+### Other markup
+
+The remainder of XML markup, including document type declarations, XML declarations and text declarations are all delimited by '', and may contain nested markup. If markup is being preserved the text, including nested markup, will appear as a single row in the APL array. `⎕XML` does not process the contents of such markup. This has varying effects, including but not limited to the following:
+
+- No validation is performed.
+- Constraints specified in markup such element type declarations will be ignored and therefore syntactically correct elements which fall outside their constraint will not be rejected.
+- Default attributes in attribute-list declarations will not be automatically added to elements.
+- Conditional sections will always be ignored.
+- Only standard, predefined, entity references will be recognized; entity declarations which define others entity references will have no effect.
+- External entities are not processed.
+
+## Conversion from XML
+
+- The level number in the first column of the result `R` is 0 for the outermost level and subsequent levels are represented by an increase of 1 for each level. Thus, for "<xml><document id="001">An introduction to XML </document></xml></code>" the _xml_ element is at level 0 and the _document id_ element is at level 1. The text within the _document id_ element is at level 2.
+- Each tag in the XML contains an element name and zero or more attribute name and value pairs, delimited by '<' and '>' characters. The delimiters are not included in the result matrix. The element name of a tag is stored in column 2 and the attribute(s) in column 4.
+- All XML markup other than tags are delimited by either '', or '' and '>' characters. By default these are not stored in the result matrix but the **markup** option may be used to specify that they are. The elements are stored in their entirety, except for the leading and trailing '<' and '>' characters, in column 2. Nested constructs are treated as a single block. Because the leading and trailing '<' and '>' characters are stripped, such entries will always have either '!' or '&' as the first character.
+- Character data itself has no tag name or attributes. As an optimisation, when character data is the sole content of an element, it is included with its parent rather than as a separate row in the result. Note that when this happens, the level number stored is that of the parent; the data itself implicitly has a level number one greater.
+- Attribute name and value pairs associated with the element name are stored in the fourth column, in an (*n x 2*) matrix of character values, for the *n* (including zero) pairs.
+- Each row is further described in the fifth column as a convenience to simplify processing of the array (although this information could be deduced). Any given row may contain an entry for an element, character data, markup not otherwise defined, a comment or a processing instruction. Furthermore, an element will have zero or more of these as children. For all types except elements, the value in the fifth column is as shown above. For elements, the value is computed by adding together the value of the row itself (1) and those of its children. For example, the value for a row for an element which contains one or more sub-elements and character data is 7 – that is 1 (element) + 2 (child element) + 4 (character data). It should be noted that:
+- Odd values always represent elements. Odd values other than 1 indicate that there are children.
+- Elements which contain just character data (5) are combined into a single row as noted previously.
+- Only immediate children are considered when computing the value. For example, an element which contains a sub-element which in turn contains character data does not itself contain the character data.
+- The computed value is derived from what is actually preserved in the array. For example, if the source XML contains an element which contains a comment, but comments are being discarded, there will be no entry for the comment in the array and the fifth column for the element will not indicate that it has a child comment.
+
+### Conversion to XML
+
+Conversion to XML takes an array with the format described above and generates XML text from it. There are some simplifications to the array which are accepted:
+
+- The fifth column is not needed for XML generation and is effectively ignored. Any numeric values are accepted, or the column may be omitted altogether. If the fifth column is omitted then the fourth column may also be omitted.
+- For the fourth column, if there are no attributes in a particular row then the `(0 2⍴⊂'')` may be abbreviated as `⍬` (zilde). If there is only one attribute then a 2-element vector can be specified.
+- Data in the third column and attribute values in the fourth column (if present) may be provided as either character vectors or numeric values. Numeric values are implicitly formatted as if `⎕PP` was set to 17.
+
+The following validations are performed on the data in the array:
+
+- All elements within the array are checked for type.
+- Values in column 1 must be non-negative and start from level 0, and the increment from one row to the next must be `≤` +1.
+- Tag names in column 2 and attribute names in column 4 (if present) must conform to the XML name definition.
+
+Then, character references and entity references are emitted in place of characters where necessary, to ensure that valid XML is generated. However, markup, if present, is *not* validated and it is possible to generate invalid XML if care in not taken with markup constructs.
+
+### Options
+
+There are 3 options which may be specified using the Variant operator `⍠` (recommended) or by the left argument `X` (retained for backwards compatibility). The names are different and are case-sensitive; they must be spelled exactly as shown below.
+
+|Option names for Variant|Option names for left argument|
+|------------------------|------------------------------|
+|Whitespace |whitespace |
+|Markup |markup |
+|UnknownEntity |unknown-entity |
+
+The values of each option are tabulated below. In each case the value of the option for Variant is given first, followed by its equivalent for the left argument in brackets; for example, **UnknownEntity (unknown-entity)**.
+
+Note that the default value is shown first, and that the option names and values are case-sensitive.
+
+If options are specified using the left argument, `X` specifies a set of option/value pairs, each of which is a character vector. `X` can be a 2-element vector, or a vector of 2-element character vectors. In the examples below, this method is illustrated by the equivalent expression written as a comment, following the recommended approach using the Variant operator `⍠`:
+
+Errors detected in the input arrays or options will all cause `DOMAIN ERROR`.
+
+### Whitespace (whitespace)
+
+When converting from XML `Whitespace` specifies the default handling of white space surrounding and within character data. When converting to XML `Whitespace` specifies the default formatting of the XML. Note that attribute values are not comprised of character data so white space in attribute values is always preserved.
+
+|Converting from XML||
+|---|---|
+|Strip (strip)|All leading and trailing whitespace sequences are removed; remaining whitespace sequences are replaced by a single space character|
+|`Trim(trim)`|All leading and trailing whitespace sequences are removed; all remaining white space sequences are handled as preserve|
+|`Preserve(preserve)`|Whitespace is preserved as given except that line endings are represented by Linefeed ( `⎕UCS 10` )|
+|Converting to XML||
+|Strip (strip)|All leading and trailing whitespace sequences are removed; remaining whitespace sequences within the data are replaced by a single space character. XML is generated with formatting and indentation to show the data structure|
+|`Trim(trim)`|Synonymous with `strip`|
+|`Preserve(preserve)`|White space in the data is preserved as given, except that line endings are represented by Linefeed ( `⎕UCS 10` ). XML is generated with no formatting and indentation other than that which is contained within the data|
+```apl
+
+ ]Display eg
+┌→───────────────────┐
+│ │
+│ │
+│ Data1 │
+│ │
+│ Data2 │
+│ Data3 │
+│ Data4 │
+│ │
+│ │
+│ │
+└────────────────────┘
+
+```
+
+### Markup (markup)
+
+When converting from XML, `Markup` determines whether markup (other than entity tags) appears in the output array or not. When converting to XML `Markup` has no effect.
+
+|Converting from XML ||
+|--------------------|----------------------------------------------------------------------------------------------------------------------|
+|Strip (strip) |Markup data is not included in the output array |
+|`Preserve(preserve)`|Markup text appears in the output array, without the leading '<' and trailing '>' in the tag (2 nd ) column|
+```apl
+
+ ]Display eg
+┌→───────────────────┐
+│ │
+│ │
+│ Data1 │
+│ │
+│ Data2 │
+│ Data3 │
+│ Data4 │
+│ │
+│ │
+│ │
+└────────────────────┘
+
+```
+
+### UnknownEntity (unknown-entity)
+
+When converting from XML, this option determines what happens when an unknown entity reference, or a character reference for a Unicode character which cannot be represented as an APL character, is encountered. In Classic versions of Dyalog APL that is any Unicode character which does not appear in `⎕AVU`. When converting to XML, this option determines what happens to Esc characters (`⎕UCS 27`) in data.
+
+|Converting from XML ||
+|--------------------|-------------------------------------------------------------------------------------------------------------|
+|Replace (replace) |The reference is replaced by a single '?' character |
+|`Preserve(preserve)`|The reference is included in the output data as given, but with the leading '&' replaced by Esc ( `⎕UCS 27` )|
+|Converting to XML ||
+|Replace (replace) |Esc ( `⎕UCS 27` ) is preserved |
+|`Preserve(preserve)`|Esc ( `⎕UCS 27` ) is replaced by '&' |
+
+
+
+ ⎕XML XML
+
diff --git a/language-reference-guide/docs/system-functions/xml.md b/language-reference-guide/docs/system-functions/xml-monadic.md
similarity index 97%
rename from language-reference-guide/docs/system-functions/xml.md
rename to language-reference-guide/docs/system-functions/xml-monadic.md
index 99099496b5b..b25be2e5088 100644
--- a/language-reference-guide/docs/system-functions/xml.md
+++ b/language-reference-guide/docs/system-functions/xml-monadic.md
@@ -3,11 +3,11 @@ search:
boost: 2
---
-# XML Convert `R←{X} ⎕XML Y`{{key}}
+# Convert XML `R←⎕XML Y`{{key}}
`⎕XML` converts an XML string into an APL array or converts an APL array into an XML string.
-Options for `⎕XML` are specified using the Variant operator `⍠` or by the optional left argument `X`. The former is recommended but the older mechanism using the left argument is still supported.
+Options for `⎕XML` are specified using the Variant operator `⍠`.
For conversion *from* XML, `Y` is a character vector containing an XML string. The result `R` is a 5 column matrix whose columns are made up as follows:
@@ -173,7 +173,7 @@ Then, character references and entity references are emitted in place of charact
### Options
-There are 3 options which may be specified using the Variant operator `⍠` (recommended) or by the optional left argument `X` (retained for backwards compatibility). The names are different and are case-sensitive; they must be spelled exactly as shown below.
+There are 3 options, which are specified using the Variant operator `⍠`. The names are different and are case-sensitive; they must be spelled exactly as shown below.
|Option names for Variant|Option names for left argument|
|------------------------|------------------------------|
@@ -185,13 +185,6 @@ The values of each option are tabulated below. In each case the value of the opt
Note that the default value is shown first, and that the option names and values are case-sensitive.
-If options are specified using the optional left argument, `X` specifies a set of option/value pairs, each of which is a character vector. `X` can be a 2-element vector, or a vector of 2-element character vectors. In the examples below, this method is illustrated by the equivalent expression written as a comment, following the recommended approach using the Variant operator `⍠`:
-```apl
-
- ]Display (⎕XML⍠'Whitespace' 'Strip')eg
- ⍝ 'whitespace' 'strip' ⎕XML eg
-```
-
Errors detected in the input arrays or options will all cause `DOMAIN ERROR`.
### Whitespace (whitespace)
diff --git a/language-reference-guide/mkdocs.yml b/language-reference-guide/mkdocs.yml
index a4bb1ced768..1a791aca799 100644
--- a/language-reference-guide/mkdocs.yml
+++ b/language-reference-guide/mkdocs.yml
@@ -301,19 +301,23 @@ nav:
- '⎕AN: Account Name': system-functions/an.md
- '⎕ARBIN: Arbitrary Input': system-functions/arbin.md
- '⎕ARBOUT: Arbitrary Output': system-functions/arbout.md
- - '⎕AT: Attributes': system-functions/at.md
+ - '⎕AT: Object Attributes': system-functions/at-monadic.md
+ - '⎕AT: Object Attributes for APL2': system-functions/at-dyadic.md
- '⎕ATX: Extended Attributes': system-functions/atx.md
- '⎕AV: Atomic Vector': system-functions/av.md
- '⎕AVU: Atomic Vector Unicode': system-functions/avu.md
- '⎕BASE: Base Class': system-functions/base.md
- - '⎕C: Case Convert': system-functions/c.md
- - '⎕CLASS: Class': system-functions/class.md
+ - '⎕C: Case Fold': system-functions/c-monadic.md
+ - '⎕C: Case Map': system-functions/c-dyadic.md
+ - '⎕CLASS: Class Hierarchy': system-functions/class-monadic.md
+ - '⎕CLASS: Get Class/Interface Implementation': system-functions/class-dyadic.md
- '⎕CLEAR: Clear Workspace': system-functions/clear.md
- '⎕CMD: Execute Windows Command': system-functions/execute-windows-command.md
- '⎕CMD: Start Windows Auxiliary Processor': system-functions/start-windows-auxiliary-processor.md
- '⎕CR: Canonical Representation': system-functions/cr.md
- '⎕CS: Change Space': system-functions/cs.md
- - '⎕CSV: Comma Separated Values': system-functions/csv.md
+ - '⎕CSV: Import CSV': system-functions/csv-monadic.md
+ - '⎕CSV: Export CSV': system-functions/csv-dyadic.md
- '⎕CT: Comparison Tolerance': system-functions/ct.md
- '⎕CY: Copy Workspace': system-functions/cy.md
- '⎕D: Digits': system-functions/d.md
@@ -327,22 +331,27 @@ nav:
- '⎕DR: Data Representation Monadic': system-functions/data-representation-monadic.md
- '⎕DR: Data Representation Dyadic': system-functions/data-representation-dyadic.md
- '⎕DT: Datetime': system-functions/dt.md
- - '⎕ED: Edit Object': system-functions/ed.md
+ - '⎕ED: Edit Objects': system-functions/ed-monadic.md
+ - '⎕ED: Edit Objects with Type': system-functions/ed-dyadic.md
- '⎕EM: Event Message': system-functions/em.md
- '⎕EN: Event Number': system-functions/en.md
- '⎕EX: Expunge Object': system-functions/ex.md
- '⎕EXCEPTION: Exception': system-functions/exception.md
- - '⎕EXPORT: Export Object': system-functions/export.md
+ - '⎕EXPORT: Query Export Type': system-functions/export-monadic.md
+ - '⎕EXPORT: Set Export Type': system-functions/export-dyadic.md
- '⎕FAPPEND: File Append Component': system-functions/fappend.md
- '⎕FAVAIL: File System Available': system-functions/favail.md
- - '⎕FCHK: File Check and Repair': system-functions/fchk.md
+ - '⎕FCHK: Check/Repair Component File': system-functions/fchk-monadic.md
+ - '⎕FCHK: Custom Check/Repair Component File': system-functions/fchk-dyadic.md
- '⎕FCOPY: File Copy': system-functions/fcopy.md
- '⎕FCREATE: File Create': system-functions/fcreate.md
- '⎕FDROP: File Drop Component': system-functions/fdrop.md
- '⎕FERASE: File Erase': system-functions/ferase.md
- '⎕FHIST: File History': system-functions/fhist.md
- - '⎕FHOLD: File Hold': system-functions/fhold.md
- - '⎕FIX: Fix Script': system-functions/fix.md
+ - '⎕FHOLD: Component File Hold': system-functions/fhold-monadic.md
+ - '⎕FHOLD: Component File Hold with Timeout': system-functions/fhold-dyadic.md
+ - '⎕FIX: Define Namespace': system-functions/fix-monadic.md
+ - '⎕FIX: Define Objects': system-functions/fix-dyadic.md
- '⎕FLIB: Component File Library': system-functions/flib.md
- '⎕FMT: Format Monadic': system-functions/format-monadic.md
- '⎕FMT: Format Dyadic': system-functions/format-dyadic.md
@@ -355,7 +364,8 @@ nav:
- '⎕FREAD: File Read Component': system-functions/fread.md
- '⎕FRENAME: File Rename': system-functions/frename.md
- '⎕FREPLACE: File Replace Component': system-functions/freplace.md
- - '⎕FRESIZE: File Resize': system-functions/fresize.md
+ - '⎕FRESIZE: Compact Component File': system-functions/fresize-monadic.md
+ - '⎕FRESIZE: Resize Component File': system-functions/fresize-dyadic.md
- '⎕FSIZE: File Size': system-functions/fsize.md
- '⎕FSTAC: File Set Access': system-functions/fstac.md
- '⎕FSTIE: File Share Tie': system-functions/fstie.md
@@ -364,55 +374,70 @@ nav:
- '⎕FX: Fix Definition': system-functions/fx.md
- '⎕INSTANCES: Instances': system-functions/instances.md
- '⎕IO: Index Origin': system-functions/io.md
- - '⎕JSON: JSON Convert': system-functions/json.md
+ - '⎕JSON: Auto-convert JSON': system-functions/json-monadic.md
+ - '⎕JSON: Convert JSON': system-functions/json-dyadic.md
- '⎕KL: Key Label': system-functions/kl.md
- '⎕LC: Line Count': system-functions/lc.md
- '⎕LOAD: Load Workspace': system-functions/load.md
- - '⎕LOCK: Lock Definition': system-functions/lock.md
+ - '⎕LOCK: Lock Function': system-functions/lock-monadic.md
+ - '⎕LOCK: Custom Lock Function': system-functions/lock-dyadic.md
- '⎕LX: Latent Expression': system-functions/lx.md
- - '⎕MAP: Map File': system-functions/map.md
- - '⎕MKDIR: Make Directory': system-functions/mkdir.md
+ - '⎕MAP: Map Array File': system-functions/map-monadic.md
+ - '⎕MAP: Map Raw Data File': system-functions/map-dyadic.md
+ - '⎕MKDIR: Create Directory': system-functions/mkdir-monadic.md
+ - '⎕MKDIR: Custom Create Directory': system-functions/mkdir-dyadic.md
- '⎕ML: Migration Level': system-functions/ml.md
- '⎕MONITOR: Set Monitor': system-functions/set-monitor.md
- '⎕MONITOR: Query Monitor': system-functions/query-monitor.md
- - '⎕NA: Name Association': system-functions/na.md
+ - '⎕NA: Associate External Function with Own Name': system-functions/na-monadic.md
+ - '⎕NA: Associate External Function with Custom Name': system-functions/na-dyadic.md
- '⎕NAPPEND: Native File Append': system-functions/nappend.md
- '⎕NC: Name Classification': system-functions/nc.md
- '⎕NCOPY: Native File Copy': system-functions/ncopy.md
- '⎕NCREATE: Native File Create': system-functions/ncreate.md
- - '⎕NDELETE: Native File Delete': system-functions/ndelete.md
+ - '⎕NDELETE: Delete Native File': system-functions/ndelete-monadic.md
+ - '⎕NDELETE: Custom Delete Native File': system-functions/ndelete-dyadic.md
- '⎕NERASE: Native File Erase': system-functions/nerase.md
- '⎕NEW: New Instance': system-functions/new.md
- '⎕NEXISTS: Native File Exists': system-functions/nexists.md
- - '⎕NGET: Read Text File': system-functions/nget.md
- - '⎕NINFO: Native File Information': system-functions/ninfo.md
- - '⎕NL: Name List': system-functions/nl.md
+ - '⎕NGET: Get Text File Content': system-functions/nget-monadic.md
+ - '⎕NGET: Decode Text File Content': system-functions/nget-dyadic.md
+ - '⎕NINFO: Native File Name': system-functions/ninfo-monadic.md
+ - '⎕NINFO: Native File Information': system-functions/ninfo-dyadic.md
+ - '⎕NL: List Object Names': system-functions/nl-monadic.md
+ - '⎕NL: List Object Names with Filter': system-functions/nl-dyadic.md
- '⎕NLOCK: Native File Lock': system-functions/nlock.md
- '⎕NMOVE: Native File Move': system-functions/nmove.md
- '⎕NNAMES: Native File Names': system-functions/nnames.md
- '⎕NNUMS: Native File Numbers': system-functions/nnums.md
- - '⎕NPARTS: File Name Parts': system-functions/nparts.md
+ - '⎕NPARTS: File Name Parts': system-functions/nparts-monadic.md
+ - '⎕NPARTS: Normalised File Name Parts': system-functions/nparts-dyadic.md
- '⎕NPUT: Write Text File': system-functions/nput.md
- - '⎕NQ: Enqueue Event': system-functions/nq.md
+ - '⎕NQ: Enqueue Event': system-functions/nq-monadic.md
+ - '⎕NQ: Custom Enqueue Event': system-functions/nq-dyadic.md
- '⎕NR: Nested Representation': system-functions/nr.md
- '⎕NREAD: Native File Read': system-functions/nread.md
- '⎕NRENAME: Native File Rename': system-functions/nrename.md
- '⎕NREPLACE: Native File Replace': system-functions/nreplace.md
- '⎕NRESIZE: Native File Resize': system-functions/nresize.md
- - '⎕NS: Namespace': system-functions/ns.md
+ - '⎕NS: Create/Clone Namespace': system-functions/ns-monadic.md
+ - '⎕NS: Create/Clone Custom Namespaces': system-functions/ns-dyadic.md
- '⎕NSI: Namespace Indicator': system-functions/nsi.md
- '⎕NSIZE: Native File Size': system-functions/nsize.md
- '⎕NTIE: Native File Tie': system-functions/ntie.md
- '⎕NULL: Null Item': system-functions/null.md
- '⎕NUNTIE: Native File Untie': system-functions/nuntie.md
- - '⎕NXLATE: Native File Translate': system-functions/nxlate.md
+ - '⎕NXLATE: Query Native File Translation Vector': system-functions/nxlate-monadic.md
+ - '⎕NXLATE: Set Native File Translation Vector': system-functions/nxlate-dyadic.md
- '⎕OFF: Sign Off APL': system-functions/off.md
- '⎕OPT: Variant': system-functions/opt.md
- '⎕OR: Object Representation': system-functions/or.md
- '⎕PATH: Search Path': system-functions/path.md
- - '⎕PFKEY: Program Function Key': system-functions/pfkey.md
+ - '⎕PFKEY: Query Programmable Function Key': system-functions/pfkey-monadic.md
+ - '⎕PFKEY: Program Function Key': system-functions/pfkey-dyadic.md
- '⎕PP: Print Precision': system-functions/pp.md
- - '⎕PROFILE: Profile Application': system-functions/profile.md
+ - '⎕PROFILE: Profile Code': system-functions/profile-monadic.md
+ - '⎕PROFILE: Filter Profile Data': system-functions/profile-dyadic.md
- '⎕PW: Print Width': system-functions/pw.md
- '⎕R: Replace': system-functions/r.md
- '⎕REFS: Cross References': system-functions/refs.md
@@ -428,10 +453,12 @@ nav:
- '⎕SHADOW: Shadow Name': system-functions/shadow.md
- '⎕SHELL: Execute external program': system-functions/shell.md
- '⎕SI: State Indicator': system-functions/si.md
- - '⎕SIGNAL: Signal Event': system-functions/signal.md
+ - '⎕SIGNAL: Signal Default/Custom Event': system-functions/signal-monadic.md
+ - '⎕SIGNAL: Signal Event with Custom Name': system-functions/signal-dyadic.md
- '⎕SIZE: Size of Object': system-functions/size.md
- '⎕SM: Screen Map': system-functions/sm.md
- - '⎕SR: Screen Read': system-functions/sr.md
+ - '⎕SR: Screen Read': system-functions/sr-monadic.md
+ - '⎕SR: Custom Screen Read': system-functions/sr-dyadic.md
- '⎕SRC: Source': system-functions/src.md
- '⎕STACK: State Indicator Stack': system-functions/stack.md
- '⎕STATE: State of Object': system-functions/state.md
@@ -445,37 +472,50 @@ nav:
- '⎕SVR: Shared Variable Retract Offer': system-functions/svr.md
- '⎕SVS: Shared Variable State': system-functions/svs.md
- '⎕SYSTEM: System Information': system-functions/system.md
- - '⎕TALLOC: Allocate Token Range': system-functions/talloc.md
+ - '⎕TALLOC: Allocate New Token Range': system-functions/talloc-monadic.md
+ - '⎕TALLOC: Allocate Existing Token Range': system-functions/talloc-dyadic.md
- '⎕TC: Terminal Control': system-functions/tc.md
- '⎕TCNUMS: Thread Child Numbers': system-functions/tcnums.md
- - '⎕TGET: Get Tokens': system-functions/tget.md
+ - '⎕TGET: Get Tokens': system-functions/tget-monadic.md
+ - '⎕TGET: Get Tokens with Timeout': system-functions/tget-dyadic.md
- '⎕THIS: This Space': system-functions/this.md
- '⎕TID: Current Thread Identity': system-functions/tid.md
- - '⎕TKILL: Kill Thread': system-functions/tkill.md
+ - '⎕TKILL: Kill Threads': system-functions/tkill-monadic.md
+ - '⎕TKILL: Kill Threads and Descendants': system-functions/tkill-dyadic.md
- '⎕TNAME: Current Thread Name': system-functions/tname.md
- '⎕TNUMS: Thread Numbers': system-functions/tnums.md
- '⎕TPOOL: Token Pool': system-functions/tpool.md
- - '⎕TPUT: Put Tokens': system-functions/tput.md
+ - '⎕TPUT: Put Tokens': system-functions/tput-monadic.md
+ - '⎕TPUT: Put Tokens with Values': system-functions/tput-dyadic.md
- '⎕TRACE: Set Trace': system-functions/set-trace.md
- '⎕TRACE: Query Trace': system-functions/query-trace.md
- '⎕TRAP: Trap Event': system-functions/trap.md
- '⎕TREQ: Token Requests': system-functions/treq.md
- '⎕TS: Timestamp': system-functions/ts.md
- '⎕TSYNC: Wait for Threads to Terminate': system-functions/tsync.md
- - '⎕UCS: Unicode Convert': system-functions/ucs.md
+ - '⎕UCS: Convert Unicode Code Point': system-functions/ucs-monadic.md
+ - '⎕UCS: Convert Unicode Representation': system-functions/ucs-dyadic.md
- '⎕USING: Using Microsoft Net Search Path': system-functions/using.md
- - '⎕VFI: Verify Fix Input': system-functions/vfi.md
- - '⎕VGET: Value Get': system-functions/vget.md
+ - '⎕VFI: Parse Numbers': system-functions/vfi-monadic.md
+ - '⎕VFI: Parse Numbers with Separators': system-functions/vfi-dyadic.md
+ - '⎕VGET: Get Value from Current Namespace': system-functions/vget-monadic.md
+ - '⎕VGET: Get Value from Namespace': system-functions/vget-dyadic.md
- '⎕VR: Vector Representation': system-functions/vr.md
- - '⎕VSET: Value Set': system-functions/vset.md
+ - '⎕VSET: Set Value in Current Namespace': system-functions/vset-monadic.md
+ - '⎕VSET: Set Value in Namespace': system-functions/vset-dyadic.md
- '⎕WA: Workspace Available': system-functions/wa.md
- - '⎕WC: Windows Create Object': system-functions/wc.md
- - '⎕WG: Windows Get Property': system-functions/wg.md
- - '⎕WN: Windows Child Names': system-functions/wn.md
- - '⎕WS: Windows Set Property': system-functions/ws.md
+ - '⎕WC: Convert Namespace to GUI Object': system-functions/wc-monadic.md
+ - '⎕WC: Create GUI Object': system-functions/wc-dyadic.md
+ - '⎕WG: Get Properties of Current GUI Object': system-functions/wg-monadic.md
+ - '⎕WG: Get Properties of GUI Object': system-functions/wg-dyadic.md
+ - '⎕WN: Get GUI Child Names in Current Object': system-functions/wn-monadic.md
+ - '⎕WN: Get GUI Child Names in Parent Object': system-functions/wn-dyadic.md
+ - '⎕WS: Set Properties of Current GUI Object': system-functions/ws-monadic.md
+ - '⎕WS: Set Properties of GUI Object': system-functions/ws-dyadic.md
- '⎕WSID: Workspace Identification': system-functions/wsid.md
- '⎕WX: Window Expose': system-functions/wx.md
- - '⎕XML: XML Convert': system-functions/xml.md
+ - '⎕XML: Convert XML': system-functions/xml-monadic.md
+ - '⎕XML: Custom Convert XML': system-functions/xml-dyadic.md
- '⎕XSI: Extended State Indicator': system-functions/xsi.md
- '⎕XT: Set External Variable': system-functions/set-external-variable.md
- '⎕XT: Query External Variable': system-functions/query-external-variable.md
diff --git a/object-reference/docs/gui-overview/object-management-functions.md b/object-reference/docs/gui-overview/object-management-functions.md
index aae7a82b3ba..7aaec036f9f 100644
--- a/object-reference/docs/gui-overview/object-management-functions.md
+++ b/object-reference/docs/gui-overview/object-management-functions.md
@@ -8,8 +8,8 @@ search:
| Symbol | Name | Description |
|---------|------|-------------|
| [`⎕DQ`](../../../language-reference-guide/system-functions/dq/) | Dequeue | processes user actions, invoking callbacks |
-| [`⎕NQ`](../../../language-reference-guide/system-functions/nq/) | Enqueue | generates an event under program control |
-| [`⎕WC`](../../../language-reference-guide/system-functions/wc/) | Create Object | creates new object with specified properties |
-| [`⎕WG`](../../../language-reference-guide/system-functions/wg/) | Get Properties | gets values of properties from an object |
-| [`⎕WN`](../../../language-reference-guide/system-functions/wn/) | Object Names | reports names of all children of an object |
-| [`⎕WS`](../../../language-reference-guide/system-functions/ws/) | Set Properties | sets values of properties for an object |
+| [`⎕NQ`](../../../language-reference-guide/system-functions/nq-monadic/) | Enqueue | generates an event under program control |
+| [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic/) | Create Object | creates new object with specified properties |
+| [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic/) | Get Properties | gets values of properties from an object |
+| [`⎕WN`](../../../language-reference-guide/system-functions/wn-monadic/) | Object Names | reports names of all children of an object |
+| [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic/) | Set Properties | sets values of properties for an object |
diff --git a/object-reference/docs/methodorevents/addcomment.md b/object-reference/docs/methodorevents/addcomment.md
index cd68153f232..693e6cc24f3 100644
--- a/object-reference/docs/methodorevents/addcomment.md
+++ b/object-reference/docs/methodorevents/addcomment.md
@@ -29,7 +29,7 @@ You can use a dfn to add several comments in one statement; for example:
Note that just before the comment is displayed, the [Grid](../objects/grid.md) generates a [ShowComment](./showcomment.md) event which gives you the opportunity to (temporarily) change the text and/or window size of a comment dynamically.
-The comment text specified by the 5th element of the argument to [`⎕NQ`](../../../language-reference-guide/system-functions/nq) must be a simple character scalar, vector, matrix or vector of vectors. Text specified by a simple character vector will be wrapped automatically if necessary. A matrix or vector of vectors may be used to explicitly specify multi-line text. If the array is a vector whose first element is an opening brace ({), the text is assumed to be in rich-text format (RTF) and is displayed accordingly. Note that there is no way for the user to scroll the text in the comment window and it is entirely your responsibility to ensure that the size of the window is appropriate for its contents.
+The comment text specified by the 5th element of the argument to [`⎕NQ`](../../../language-reference-guide/system-functions/nq-monadic) must be a simple character scalar, vector, matrix or vector of vectors. Text specified by a simple character vector will be wrapped automatically if necessary. A matrix or vector of vectors may be used to explicitly specify multi-line text. If the array is a vector whose first element is an opening brace ({), the text is assumed to be in rich-text format (RTF) and is displayed accordingly. Note that there is no way for the user to scroll the text in the comment window and it is entirely your responsibility to ensure that the size of the window is appropriate for its contents.
**Application**
diff --git a/object-reference/docs/methodorevents/undo.md b/object-reference/docs/methodorevents/undo.md
index 1cee42070de..948704e77a5 100644
--- a/object-reference/docs/methodorevents/undo.md
+++ b/object-reference/docs/methodorevents/undo.md
@@ -4,7 +4,7 @@
This method is used to undo the previous change in a [Grid](../objects/grid.md) object.
-The [Grid](../objects/grid.md) object maintains a buffer of the most recent 8 changes made by the user since the [Values](../properties/values.md) property was last set by [`⎕WC`](../../../language-reference-guide/system-functions/wc) or [`⎕WS`](../../../language-reference-guide/system-functions/ws).
+The [Grid](../objects/grid.md) object maintains a buffer of the most recent 8 changes made by the user since the [Values](../properties/values.md) property was last set by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) or [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic).
Your application can restore these changes one by one by calling the Undo method on the [Grid](../objects/grid.md). The Undo method restores the most recent change made by the user and removes that change from the undo stack.
diff --git a/object-reference/docs/objects/bitmap.md b/object-reference/docs/objects/bitmap.md
index cfc4ad2965d..2755a67c365 100644
--- a/object-reference/docs/objects/bitmap.md
+++ b/object-reference/docs/objects/bitmap.md
@@ -4,7 +4,7 @@
**Description**
-A Bitmap may be created either from a file (.BMP, .GIF or .PNG) or from APL arrays. To create a Bitmap object using [`⎕WC`](../../../language-reference-guide/system-functions/wc), you can either specify the [File](../properties/file.md) property **or** the [CBits](../properties/cbits.md) property, **or** the [Bits](../properties/bits.md) and [CMap](../properties/cmap.md) properties.
+A Bitmap may be created either from a file (.BMP, .GIF or .PNG) or from APL arrays. To create a Bitmap object using [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic), you can either specify the [File](../properties/file.md) property **or** the [CBits](../properties/cbits.md) property, **or** the [Bits](../properties/bits.md) and [CMap](../properties/cmap.md) properties.
If you specify [File](../properties/file.md), it should contain the name of a bitmap file from which the bitmap is to be read. If omitted, a .BMP file extension is added. You may also load a Bitmap from a DLL or from the DYALOG.EXE executable. See [File](../properties/file.md) property for details.
@@ -14,11 +14,11 @@ For a palette of up to 256 colours, you may specify the image using the [Bits](.
If [MaskCol](../properties/maskcol.md) is non-zero, it specifies the transparent colour for the Bitmap. Any pixels specified with the same colour will instead be displayed in whatever colour is underneath the Bitmap. This achieves similar behaviour to that of an Icon.
-The [KeepBits](../properties/keepbits.md) property has the value 0 or 1, and controls how a Bitmap is saved in the workspace. A value of 0 (the default) means that the values of [CBits](../properties/cbits.md), [Bits](../properties/bits.md) and [CMap](../properties/cmap.md) are **not** kept in the workspace. If you request the values of [CBits](../properties/cbits.md), [Bits](../properties/bits.md) or [CMap](../properties/cmap.md) with [`⎕WG`](../../../language-reference-guide/system-functions/wg), they are obtained directly from the corresponding Windows bitmap resource. When the workspace is `)LOAD`ed, the Bitmap is recreated from the associated file defined by the value of the [File](../properties/file.md) property. Note that if this file doesn't exist when the workspace is `)LOAD`ed, the Bitmap is not created, but no error is generated. However, when you reference the object you will get a `VALUE ERROR`.
+The [KeepBits](../properties/keepbits.md) property has the value 0 or 1, and controls how a Bitmap is saved in the workspace. A value of 0 (the default) means that the values of [CBits](../properties/cbits.md), [Bits](../properties/bits.md) and [CMap](../properties/cmap.md) are **not** kept in the workspace. If you request the values of [CBits](../properties/cbits.md), [Bits](../properties/bits.md) or [CMap](../properties/cmap.md) with [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic), they are obtained directly from the corresponding Windows bitmap resource. When the workspace is `)LOAD`ed, the Bitmap is recreated from the associated file defined by the value of the [File](../properties/file.md) property. Note that if this file doesn't exist when the workspace is `)LOAD`ed, the Bitmap is not created, but no error is generated. However, when you reference the object you will get a `VALUE ERROR`.
If [KeepBits](../properties/keepbits.md) is 1, the values of [CBits](../properties/cbits.md), [Bits](../properties/bits.md) and [CMap](../properties/cmap.md) **are** stored permanently in the workspace, and are used to rebuild the Bitmap when the workspace is `)LOAD`ed. In this case, the file name (if any) is ignored. Setting [KeepBits](../properties/keepbits.md) to 1 uses more workspace, but may be more convenient if you want to distribute applications.
-The [Size](../properties/size.md) property allows you to query the size of a Bitmap without having to retrieve the [CBits](../properties/cbits.md) or [Bits](../properties/bits.md) property and then take its "shape". This will be noticeably faster for a large Bitmap. If you set the [Size](../properties/size.md) property using [`⎕WS`](../../../language-reference-guide/system-functions/ws) the Bitmap is scaled to the new size.
+The [Size](../properties/size.md) property allows you to query the size of a Bitmap without having to retrieve the [CBits](../properties/cbits.md) or [Bits](../properties/bits.md) property and then take its "shape". This will be noticeably faster for a large Bitmap. If you set the [Size](../properties/size.md) property using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic) the Bitmap is scaled to the new size.
A useful feature of a Bitmap is that it can be the parent of any of the graphical objects. This allows you to create or edit a bitmap by drawing lines, circles, etc. in it.
@@ -36,7 +36,7 @@ causes the Bitmap called `bmname` to be redefined from the bitmap file specified
The [MakeGIF](../methodorevents/makegif.md) and [MakePNG](../methodorevents/makepng.md) methods may be used to convert the image represented by a Bitmap object into a GIF or PNG data stream, suitable for display in a web browser. The [TCPSendPicture](../methodorevents/tcpsendpicture.md) method may be used to transfer a Bitmap on a TCP/IP socket.
-Using a bitmap is always a 2-stage process. First you create a Bitmap object with [`⎕WC`](../../../language-reference-guide/system-functions/wc). Then you use it by specifying its name as a property of another object.
+Using a bitmap is always a 2-stage process. First you create a Bitmap object with [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic). Then you use it by specifying its name as a property of another object.
The [Picture](../properties/picture.md) property specifies the name of a Bitmap to be displayed in an [ActiveXControl](activexcontrol.md), [Button](button.md), [Form](form.md), [Group](group.md), [Image](image.md), [MDIClient](mdiclient.md), [Sm](sm.md), [Static](static.md), [StatusBar](statusbar.md), [StatusField](statusfield.md), [SubForm](subform.md), [TabBar](tabbar.md), or [ToolBar](toolbar.md).
diff --git a/object-reference/docs/objects/button.md b/object-reference/docs/objects/button.md
index b98bf390469..357c79ac63d 100644
--- a/object-reference/docs/objects/button.md
+++ b/object-reference/docs/objects/button.md
@@ -16,7 +16,7 @@ Radio buttons and Check boxes are used to select options. They each have two sta
Only one of a group of Radio buttons which share the same parent can be set ([State](../properties/state.md) is 1) at any one time. Radio buttons are therefore used for a set of choices that are **mutually exclusive**. Check boxes however, may be set together to signify a combination of options. These are used for making choices which are not mutually exclusive.
-Radio and Check buttons **also** generate [Select](../methodorevents/select.md) events when their [State](../properties/state.md) changes, and you can attach callback functions to these events to keep track of their settings. However, as Radio and Check buttons are not normally used to generate actions, it is perhaps easier to wait until the user signifies completion of the dialog box in some way, and then query the [State](../properties/state.md) of the buttons using [`⎕WG`](../../../language-reference-guide/system-functions/wg). For example, if you have a set of Radio or Check buttons in a [Group](group.md) called `f1.options`, the following statements retrieve their settings.
+Radio and Check buttons **also** generate [Select](../methodorevents/select.md) events when their [State](../properties/state.md) changes, and you can attach callback functions to these events to keep track of their settings. However, as Radio and Check buttons are not normally used to generate actions, it is perhaps easier to wait until the user signifies completion of the dialog box in some way, and then query the [State](../properties/state.md) of the buttons using [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic). For example, if you have a set of Radio or Check buttons in a [Group](group.md) called `f1.options`, the following statements retrieve their settings.
```apl
OPTIONS ← (⎕WN 'f1.options') ⎕WG¨⊂'State'
```
diff --git a/object-reference/docs/objects/clipboard.md b/object-reference/docs/objects/clipboard.md
index 62f855667f0..39cd74e58c4 100644
--- a/object-reference/docs/objects/clipboard.md
+++ b/object-reference/docs/objects/clipboard.md
@@ -8,11 +8,11 @@ When an application places data in the Windows clipboard, it may store it in one
In addition, the [Array](../properties/array.md) property may be used to set or retrieve clipboard contents in Dyalog APL array format.
-Data is read from the clipboard using [`⎕WG`](../../../language-reference-guide/system-functions/wg), specifying the name of the appropriate property for the data that you want.
+Data is read from the clipboard using [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic), specifying the name of the appropriate property for the data that you want.
-If the data has been stored in CF_Text format, the value of [Formats](../properties/formats.md) will include `'Text'` and you may retrieve the data by querying the value of the [Text](../properties/text.md) property with [`⎕WG`](../../../language-reference-guide/system-functions/wg).
+If the data has been stored in CF_Text format, the value of [Formats](../properties/formats.md) will include `'Text'` and you may retrieve the data by querying the value of the [Text](../properties/text.md) property with [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic).
-If the data has been stored in **device-independent** bitmap format, the value of [Formats](../properties/formats.md) will include `'CBits'`, `'Bits'` and `'CMap'`. To retrieve the bitmap pattern and colour map, you may query the values of the [CBits](../properties/cbits.md), or [Bits](../properties/bits.md) and [CMap](../properties/cmap.md) properties using [`⎕WG`](../../../language-reference-guide/system-functions/wg).
+If the data has been stored in **device-independent** bitmap format, the value of [Formats](../properties/formats.md) will include `'CBits'`, `'Bits'` and `'CMap'`. To retrieve the bitmap pattern and colour map, you may query the values of the [CBits](../properties/cbits.md), or [Bits](../properties/bits.md) and [CMap](../properties/cmap.md) properties using [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic).
If the data has been stored in **device-dependent** bitmap format, only the bitmap pattern is available and [Formats](../properties/formats.md) will contain `'Bits'` but not `'CMap'`. In this case you can query the [Bits](../properties/bits.md) property but not [CMap](../properties/cmap.md) without which you cannot realise the bitmap. However, if data was posted in this format, it is highly probable that the current Windows colour map applies to it. For a standard 16-colour device this is given under the description of the [CMap](../properties/cmap.md) property.
@@ -27,7 +27,7 @@ The next example retrieves a bitmap from the clipboard and defines it as a [Bitm
'BM' ⎕WC 'Bitmap' '', 'CL' ⎕WG 'Bits' 'CMap'
```
-Data may be placed in the clipboard using [`⎕WC`](../../../language-reference-guide/system-functions/wc) or [`⎕WS`](../../../language-reference-guide/system-functions/ws). To store text, you simply set the [Text](../properties/text.md) property. You may use a simple character vector or matrix, or a vector of character vectors. For example :
+Data may be placed in the clipboard using [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) or [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic). To store text, you simply set the [Text](../properties/text.md) property. You may use a simple character vector or matrix, or a vector of character vectors. For example :
```apl
'CL' ⎕WS 'Text' 'Hello World'
```
@@ -43,7 +43,7 @@ or
'CL' ⎕WS ('Bits' Bits)('CMap' CMap)
```
-Note that if you use the latter method, you must set **both** properties in one [`⎕WS`](../../../language-reference-guide/system-functions/ws) statement. This is also true if you wish to store data in both Text and Bitmap formats together.
+Note that if you use the latter method, you must set **both** properties in one [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic) statement. This is also true if you wish to store data in both Text and Bitmap formats together.
The [Metafile](../properties/metafileobj.md) property allows graphical information to be restored in and retrieved from the clipboard in Windows Metafile format. See the description of the [Metafile](../properties/metafileobj.md) property for details.
diff --git a/object-reference/docs/objects/combo.md b/object-reference/docs/objects/combo.md
index 97a857bd7ab..a5a23e87eee 100644
--- a/object-reference/docs/objects/combo.md
+++ b/object-reference/docs/objects/combo.md
@@ -17,7 +17,7 @@ Note that if the user first selects an item from the list box, then changes it i
!!! warning
Windows truncates the contents of the edit field (reflected in the value of the Text property) to 510 characters.
-For a Combo with [Style ](../properties/style.md)`'Simple'`, the [Index](../properties/index-property.md) property specifies or reports the position of [Items](../properties/items.md) in the list box as a positive integer value. If [Index](../properties/index-property.md) has the value "n", it means that the "nth" item in [Items](../properties/items.md) is displayed on the top line in the list box. Note that [Index](../properties/index-property.md) can only be set using [`⎕WS`](../../../language-reference-guide/system-functions/ws) and **not** by [`⎕WC`](../../../language-reference-guide/system-functions/wc) and is ignored if all the [Items](../properties/items.md) fit in the list box. The default value for [Index](../properties/index-property.md) is `⎕IO`.
+For a Combo with [Style ](../properties/style.md)`'Simple'`, the [Index](../properties/index-property.md) property specifies or reports the position of [Items](../properties/items.md) in the list box as a positive integer value. If [Index](../properties/index-property.md) has the value "n", it means that the "nth" item in [Items](../properties/items.md) is displayed on the top line in the list box. Note that [Index](../properties/index-property.md) can only be set using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic) and **not** by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) and is ignored if all the [Items](../properties/items.md) fit in the list box. The default value for [Index](../properties/index-property.md) is `⎕IO`.
The [SelText](../properties/seltext.md) property identifies the portion of the edit field that is highlighted. It is not applicable to a Combo with [Style ](../properties/style.md)`'Drop'` as the user cannot enter or change data in its edit field.
@@ -29,7 +29,7 @@ If the [Style](../properties/style.md) is `'Simple'` or `'DropEdit'`, the [HScro
[VScroll](../properties/vscroll.md) and [HScroll](../properties/hscroll.md) may only be set when the object is created and may not subsequently be changed.
-Note that when you change the [Items](../properties/items.md) property using [`⎕WS`](../../../language-reference-guide/system-functions/ws), the [Text](text.md), [SelItems](../properties/selitems.md) and [SelText](../properties/seltext.md) properties are all reset to their default values.
+Note that when you change the [Items](../properties/items.md) property using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic), the [Text](text.md), [SelItems](../properties/selitems.md) and [SelText](../properties/seltext.md) properties are all reset to their default values.
The Combo object will report a [Select](../methodorevents/select.md) event (if enabled) when the user chooses an item from the list box. It will generate a [Change](../methodorevents/change.md) event (if enabled) when the user manually alters the contents of the edit field and then changes the focus to another object.
diff --git a/object-reference/docs/objects/cursor.md b/object-reference/docs/objects/cursor.md
index 8a250297408..12ecfe666db 100644
--- a/object-reference/docs/objects/cursor.md
+++ b/object-reference/docs/objects/cursor.md
@@ -6,7 +6,7 @@
The [File](../properties/file.md) property defines the name of a cursor file associated with the Cursor object, or it specifies the name of a DLL and the resource number or name of the cursor therein. If you omit the file extension, the system assumes .CUR. To use an animated cursor you must therefore specify the .AMI extension explicitly.
-If the value of the [File](../properties/file.md) property is set by [`⎕WS`](../../../language-reference-guide/system-functions/ws), no immediate action is taken, but the corresponding file may subsequently be read or written using the [FileRead](../methodorevents/fileread.md) or [FileWrite](../methodorevents/filewrite.md) methods.
+If the value of the [File](../properties/file.md) property is set by [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic), no immediate action is taken, but the corresponding file may subsequently be read or written using the [FileRead](../methodorevents/fileread.md) or [FileWrite](../methodorevents/filewrite.md) methods.
The [Bits](../properties/bits.md) and [Mask](../properties/mask.md) properties define the appearance of the cursor. Both are Boolean matrices with a shape of 32 32. The colour of each pixel in the cursor is defined by the following table. Note that a 0 in [Bits](../properties/bits.md) combined with a 1 in [Mask](../properties/mask.md) causes the corresponding pixel to be the colour of the background. This is used to give the cursor a non-rectangular shape.
diff --git a/object-reference/docs/objects/edit.md b/object-reference/docs/objects/edit.md
index 4c5091e1405..6a86b0bc764 100644
--- a/object-reference/docs/objects/edit.md
+++ b/object-reference/docs/objects/edit.md
@@ -30,11 +30,11 @@ The [HScroll](../properties/hscroll.md) property determines whether or not the d
If the [Style](../properties/style.md) is `'Multi'`, [Text](../properties/text.md) may set using a simple character vector, a simple matrix, or a vector of vectors. If [Text](../properties/text.md) is specified by a matrix or by a vector of vectors, "new-line" characters are automatically added at the end of each line in the Edit control.
-The user may insert a "new-line" character in the text by pressing Ctrl-Enter. If [Text](../properties/text.md) was set by a matrix, it is returned as a matrix. Otherwise it is returned as a vector of vectors. "New-line" characters are not returned. If [Text](../properties/text.md) was not specified by [`⎕WC`](../../../language-reference-guide/system-functions/wc) or [`⎕WS`](../../../language-reference-guide/system-functions/ws) it is returned an empty matrix (`1 0⍴''`). However, if [Text](../properties/text.md) was not specified, but the user types and then empties the field, it is returned as an empty nested array (`,⊂''`)
+The user may insert a "new-line" character in the text by pressing Ctrl-Enter. If [Text](../properties/text.md) was set by a matrix, it is returned as a matrix. Otherwise it is returned as a vector of vectors. "New-line" characters are not returned. If [Text](../properties/text.md) was not specified by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) or [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic) it is returned an empty matrix (`1 0⍴''`). However, if [Text](../properties/text.md) was not specified, but the user types and then empties the field, it is returned as an empty nested array (`,⊂''`)
The [Justify](../properties/justify.md) property determines whether the text in a multi-line Edit object is `'Left'`, `'Right'`, or `'Centre'` justified. Setting [Justify](../properties/justify.md) to `'Centre'` or `'Right'` also forces word-wrapping and disables horizontal scrolling, whatever the value of [HScroll](../properties/hscroll.md). Note that the keyword `'Centre'` may also be spelled `'Center'`. [Justify](../properties/justify.md) may only be specified when the object is created using `⎕WC`.
-If [Justify](../properties/justify.md) is `'Left'`, the [HScroll](../properties/hscroll.md) property determines whether or not text may be scrolled horizontally. If [HScroll](../properties/hscroll.md) is set to `¯2`, each individual line may be any length, but the object does not have a horizontal scrollbar. Sideways scrolling is achieved using the cursor keys, or by typing. If [HScroll](../properties/hscroll.md) is `¯1`, each individual line may be of any length and the object will have a horizontal scrollbar. If [HScroll](../properties/hscroll.md) is `0`, lines are automatically "word-wrapped" at the right edge of the object. This means that the number of lines displayed may be greater than the number of lines implied by the rows of the matrix or the number of vectors supplied. In particular, if you specify a single long vector, it will be broken up into lines for you on the display, but still returned as a single vector by [`⎕WG`](../../../language-reference-guide/system-functions/wg).
+If [Justify](../properties/justify.md) is `'Left'`, the [HScroll](../properties/hscroll.md) property determines whether or not text may be scrolled horizontally. If [HScroll](../properties/hscroll.md) is set to `¯2`, each individual line may be any length, but the object does not have a horizontal scrollbar. Sideways scrolling is achieved using the cursor keys, or by typing. If [HScroll](../properties/hscroll.md) is `¯1`, each individual line may be of any length and the object will have a horizontal scrollbar. If [HScroll](../properties/hscroll.md) is `0`, lines are automatically "word-wrapped" at the right edge of the object. This means that the number of lines displayed may be greater than the number of lines implied by the rows of the matrix or the number of vectors supplied. In particular, if you specify a single long vector, it will be broken up into lines for you on the display, but still returned as a single vector by [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic).
The [VScroll](../properties/vscroll.md) property determines whether or not data may be scrolled vertically and whether or not the object has a vertical scrollbar. A value of `0` inhibits scrolling; `¯2` means scrollable, without a scrollbar; `¯1` means scrollable with a scrollbar. [VScroll](../properties/vscroll.md) may only be set when the object is created and may not subsequently be changed.
diff --git a/object-reference/docs/objects/filebox.md b/object-reference/docs/objects/filebox.md
index d4e5fe39f8b..0199fa0dbdd 100644
--- a/object-reference/docs/objects/filebox.md
+++ b/object-reference/docs/objects/filebox.md
@@ -4,7 +4,7 @@
**Description**
-The FileBox object implements the standard Windows FileSelection Dialog Box. This is a "modal" object. When you create a FileBox with [`⎕WC`](../../../language-reference-guide/system-functions/wc), it is initially invisible and the user cannot interact with it. To use it, you must execute [`⎕DQ`](../../../language-reference-guide/system-functions/dq) with the name of the FileBox as its right argument. This causes the FileBox to be displayed. During the "local" [`⎕DQ`](../../../language-reference-guide/system-functions/dq) the user may interact **only** with the FileBox, or with other applications. When the user terminates the operation (by pressing the "Save", "Open", or "Cancel" Buttons, or by closing the window) the "local" [`⎕DQ`](../../../language-reference-guide/system-functions/dq) terminates, and the FileBox disappears.
+The FileBox object implements the standard Windows FileSelection Dialog Box. This is a "modal" object. When you create a FileBox with [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic), it is initially invisible and the user cannot interact with it. To use it, you must execute [`⎕DQ`](../../../language-reference-guide/system-functions/dq) with the name of the FileBox as its right argument. This causes the FileBox to be displayed. During the "local" [`⎕DQ`](../../../language-reference-guide/system-functions/dq) the user may interact **only** with the FileBox, or with other applications. When the user terminates the operation (by pressing the "Save", "Open", or "Cancel" Buttons, or by closing the window) the "local" [`⎕DQ`](../../../language-reference-guide/system-functions/dq) terminates, and the FileBox disappears.
When the "local" [`⎕DQ`](../../../language-reference-guide/system-functions/dq) is terminated, the FileBox generates either an [FileBoxOK](../methodorevents/fileboxok.md)(71) or [FileBoxCancel](../methodorevents/fileboxcancel.md)(72) event. The former is generated when the user presses the "Save" or "Open" button; the latter when the user presses the "Cancel" button or closes the FileBox.
diff --git a/object-reference/docs/objects/font.md b/object-reference/docs/objects/font.md
index a9839a7fd5d..c8a65de101a 100644
--- a/object-reference/docs/objects/font.md
+++ b/object-reference/docs/objects/font.md
@@ -9,7 +9,7 @@ This object loads a Windows font into memory ready for use by another object.
The characteristics of the font are specified by its properties as follows :
|---|---|
-|[PName](../properties/pname.md)|A character vector containing the name of the font face. The default is `'System'` . Note that case is ignored when you specify the name, although it will be returned correctly by [`⎕WG`](../../../language-reference-guide/system-functions/wg) .|
+|[PName](../properties/pname.md)|A character vector containing the name of the font face. The default is `'System'` . Note that case is ignored when you specify the name, although it will be returned correctly by [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic) .|
|[Size](../properties/size.md)|An integer that specifies the character height of the font in pixels.|
|[Fixed](../properties/fixed.md)|A Boolean value that specifies whether the font is fixed-width (1) or proportional (0).|
|[Italic](../properties/italic.md)|A Boolean value that specifies whether the font is italicised (1) or not (0).|
@@ -28,7 +28,7 @@ If you are using `'ScaledPixel'`, this means that your fonts will also be scaled
When you ask Windows to allocate a font, you may specify as many or as few of these properties as you wish. Windows actually supplies the font that most closely matches the attributes you have specified. The matching rules it uses are complex, and may be found in the appropriate Windows documentation.
-The values of the above properties after [`⎕WC`](../../../language-reference-guide/system-functions/wc) or [`⎕WS`](../../../language-reference-guide/system-functions/ws) reflect the attributes of the font which has been allocated by Windows, and not necessarily the values you have specified. Furthermore, it is possible that changing the value of one property will cause the values of others to be changed.
+The values of the above properties after [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) or [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic) reflect the attributes of the font which has been allocated by Windows, and not necessarily the values you have specified. Furthermore, it is possible that changing the value of one property will cause the values of others to be changed.
**Application**
diff --git a/object-reference/docs/objects/form.md b/object-reference/docs/objects/form.md
index 70c579e8a9b..5b61792347a 100644
--- a/object-reference/docs/objects/form.md
+++ b/object-reference/docs/objects/form.md
@@ -60,7 +60,7 @@ refer to the horizontal scrollbar. The [Thumb](../properties/thumb.md) property
thumb in the vertical and horizontal scrollbars respectively. When the user
attempts to move the thumb in one of the scrollbars, the Form generates a [VScroll](../methodorevents/vscroll.md) or [HScroll](../methodorevents/hscroll.md) event.
-[VScroll](../methodorevents/vscroll.md) and [HScroll](../methodorevents/hscroll.md) cannot be changed using [`⎕WS`](../../../language-reference-guide/system-functions/ws).
+[VScroll](../methodorevents/vscroll.md) and [HScroll](../methodorevents/hscroll.md) cannot be changed using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic).
However, you can make a scrollbar disappear by setting the corresponding element
of [Range](../properties/range.md) to 1, thus allowing you to
dynamically switch the scrollbar off and on. Note however that doing so will
diff --git a/object-reference/docs/objects/grid.md b/object-reference/docs/objects/grid.md
index 4522ae7f11a..e5a236c18ef 100644
--- a/object-reference/docs/objects/grid.md
+++ b/object-reference/docs/objects/grid.md
@@ -120,7 +120,7 @@ perform these corresponding operations.
The Grid object maintains a buffer of the most recent 8 changes made by the
user since the [Values](../properties/values.md) property was last set
-by [`⎕WC`](../../../language-reference-guide/system-functions/wc) or [`⎕WS`](../../../language-reference-guide/system-functions/ws).
+by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) or [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic).
Your application can restore these changes one by one by calling the [Undo](../methodorevents/undo.md) method. The [Undo](../methodorevents/undo.md) method restores the most recent
change made by the user and removes that change from the undo stack. It is
therefore not possible to "undo an undo".
diff --git a/object-reference/docs/objects/icon.md b/object-reference/docs/objects/icon.md
index 8e058814f44..0a450821a11 100644
--- a/object-reference/docs/objects/icon.md
+++ b/object-reference/docs/objects/icon.md
@@ -8,7 +8,7 @@ The [File](../properties/file.md) property specifies the name of an icon file (
The Style property identifies the size of the icon and must be `'Large'` or `'Small'`. The former specifies a 32x32 icon and is the default; the latter specifies a 16x16 icon. The size of the icon is not embedded within the icon data, so it is **essential** to specify Style correctly. Note that a single file may contain both sizes of an icon. Style is only relevant when loading an Icon from file.
-If the value of the [File](../properties/file.md) property is set by [`⎕WS`](../../../language-reference-guide/system-functions/ws), no immediate action is taken, but the corresponding file may subsequently be read or written using the [FileRead](../methodorevents/fileread.md) or [FileWrite](../methodorevents/filewrite.md) methods.
+If the value of the [File](../properties/file.md) property is set by [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic), no immediate action is taken, but the corresponding file may subsequently be read or written using the [FileRead](../methodorevents/fileread.md) or [FileWrite](../methodorevents/filewrite.md) methods.
16-bit icons contain fewer than 256 colours and each pixel is either transparent or opaque. The images in such Icons are represented by the [Bits](../properties/bits.md), [Mask](../properties/mask.md) and [CMap](../properties/cmap.md) properties.
diff --git a/object-reference/docs/objects/list.md b/object-reference/docs/objects/list.md
index 1710f0d45be..32dab570b5e 100644
--- a/object-reference/docs/objects/list.md
+++ b/object-reference/docs/objects/list.md
@@ -8,7 +8,7 @@ The [Items](../properties/items.md) property is either a vector of character vec
The size and position of the area used to display the list is defined by [Size](../properties/size.md) and [Posn](../properties/posn.md). If [Size](../properties/size.md) is not chosen to represent an exact number of lines of text, the bottom line of text may be clipped.
-The [Index](../properties/index-property.md) property specifies or reports the position of [Items](../properties/items.md) in the list box as a positive integer value. If [Index](../properties/index-property.md) has the value "n", it means that the "nth" item in [Items](../properties/items.md) is displayed on the top line in the list box. However, it is ignored if all the [Items](../properties/items.md) fit within the List object. Note that [Index](../properties/index-property.md) can only be set using [`⎕WS`](../../../language-reference-guide/system-functions/ws) and not by [`⎕WC`](../../../language-reference-guide/system-functions/wc). The default value for [Index](../properties/index-property.md) is `⎕IO`.
+The [Index](../properties/index-property.md) property specifies or reports the position of [Items](../properties/items.md) in the list box as a positive integer value. If [Index](../properties/index-property.md) has the value "n", it means that the "nth" item in [Items](../properties/items.md) is displayed on the top line in the list box. However, it is ignored if all the [Items](../properties/items.md) fit within the List object. Note that [Index](../properties/index-property.md) can only be set using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic) and not by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic). The default value for [Index](../properties/index-property.md) is `⎕IO`.
The [Style](../properties/style.md) property may be `'Single'` (the default) or `'Multi'`. `'Single'` allows only a single item to be selected. `'Multi'` allows several items to be chosen. In either case, if the [Select](../methodorevents/select.md) event is enabled, it is generated whenever the selection changes. If [Style](../properties/style.md) is `'Multi'` the List will generate a [Select](../methodorevents/select.md) event every time an item is added to the selected list.
diff --git a/object-reference/docs/objects/metafile.md b/object-reference/docs/objects/metafile.md
index 557347f18c4..07a7b5ce152 100644
--- a/object-reference/docs/objects/metafile.md
+++ b/object-reference/docs/objects/metafile.md
@@ -6,12 +6,12 @@
The Windows Metafile is a mechanism for representing a picture in terms of a collection of graphical components. Windows Metafiles are distributed in special files (.WMF) from which they are loaded into memory for use by an application. Once loaded a Metafile is a Windows "resource" that can be used in a variety of ways. The Metafile object represents this resource.
-The [File](../properties/file.md) property specifies the name of a .WMF file from which the Metafile is to be loaded or to which it is to be saved. If you specify [File](../properties/file.md) with [`⎕WC`](../../../language-reference-guide/system-functions/wc) the Metafile object is loaded from it. If you specify [File](../properties/file.md) with [`⎕WS`](../../../language-reference-guide/system-functions/ws) no action takes place until you instruct the Metafile object to re-initialise itself from the file or to save itself to the file. These operations are performed using the [FileRead](../methodorevents/fileread.md) and [FileWrite](../methodorevents/filewrite.md) methods. If you omit the [File](../properties/file.md) property in the argument to [`⎕WC`](../../../language-reference-guide/system-functions/wc) or if you specify a null vector, the Metafile object is initially empty. The following example loads the picture defined by the GOLF.WMF Metafile that is distributed with Microsoft Office.
+The [File](../properties/file.md) property specifies the name of a .WMF file from which the Metafile is to be loaded or to which it is to be saved. If you specify [File](../properties/file.md) with [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) the Metafile object is loaded from it. If you specify [File](../properties/file.md) with [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic) no action takes place until you instruct the Metafile object to re-initialise itself from the file or to save itself to the file. These operations are performed using the [FileRead](../methodorevents/fileread.md) and [FileWrite](../methodorevents/filewrite.md) methods. If you omit the [File](../properties/file.md) property in the argument to [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) or if you specify a null vector, the Metafile object is initially empty. The following example loads the picture defined by the GOLF.WMF Metafile that is distributed with Microsoft Office.
```apl
'GOLF' ⎕WC 'Metafile' 'C:\MSOFFICE\CLIPART\GOLF'
```
-Whether or not the Metafile object is initialised from a file, you can add graphical components to it by creating child objects. However the Metafile behaves like a [Bitmap](bitmap.md) object in that its children cannot be modified using [`⎕WS`](../../../language-reference-guide/system-functions/ws) nor can they be removed using `⎕EX`. The components of a Metafile that has been initialised from a .WMF file also cannot be referenced in any way. It is therefore recommended that you use unnamed objects when you create the graphical components of a Metafile.
+Whether or not the Metafile object is initialised from a file, you can add graphical components to it by creating child objects. However the Metafile behaves like a [Bitmap](bitmap.md) object in that its children cannot be modified using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic) nor can they be removed using `⎕EX`. The components of a Metafile that has been initialised from a .WMF file also cannot be referenced in any way. It is therefore recommended that you use unnamed objects when you create the graphical components of a Metafile.
The following statements create an empty Metafile called `MF` and then draw a line and circle in it.
```apl
diff --git a/object-reference/docs/objects/msgbox.md b/object-reference/docs/objects/msgbox.md
index 711bfa1eb6c..ae20438750d 100644
--- a/object-reference/docs/objects/msgbox.md
+++ b/object-reference/docs/objects/msgbox.md
@@ -33,7 +33,7 @@ The [Btns](../properties/btns.md) property may specify one of six sets of button
- `'ABORT' 'RETRY' 'IGNORE'`
-If any other combination is specified, [`⎕WC`](../../../language-reference-guide/system-functions/wc) and [`⎕WS`](../../../language-reference-guide/system-functions/ws) will report a `DOMAIN ERROR`. The names of the buttons are however case-insensitive, so the system will accept `'ok'`, `'Ok'`, `'oK'` or `'OK'`. If [Btns](../properties/btns.md) is not specified, it assumes a default according to [Style](../properties/style.md) as follows:
+If any other combination is specified, [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) and [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic) will report a `DOMAIN ERROR`. The names of the buttons are however case-insensitive, so the system will accept `'ok'`, `'Ok'`, `'oK'` or `'OK'`. If [Btns](../properties/btns.md) is not specified, it assumes a default according to [Style](../properties/style.md) as follows:
|Style |Btns |
|-------------------------|---------------|
@@ -43,7 +43,7 @@ If any other combination is specified, [`⎕WC`](../../../language-reference-gui
The [Default](../properties/default.md) property may be used to determine which of the buttons is the "default" button, that is, the one which initially has the focus and is "selected" when the user presses the Enter key. It has the value 1, 2 or 3. If [Default](../properties/default.md) is not specified, the first button is the "default" button. Note that if the user switches focus to another button and presses Enter, this action selects the button with the focus.
-Like a pop-up (floating) [Menu](menu.md), the MsgBox object is unusual in that it is strictly modal. It is created by [`⎕WC`](../../../language-reference-guide/system-functions/wc) in the normal way, but at that stage is invisible and inactive. It is activated ONLY when [`⎕DQ`](../../../language-reference-guide/system-functions/dq) is called with the name of the MsgBox as the argument. When this is done, the MsgBox object pops up and is activated. Because there is no other object specified in the argument to [`⎕DQ`](../../../language-reference-guide/system-functions/dq), all other objects are de-activated. The only thing that the user can do (within the APL application) is to press one of the buttons in the MsgBox. When this happens, the MsgBox automatically pops down, the callback function (if any) is fired, and then [`⎕DQ`](../../../language-reference-guide/system-functions/dq) terminates.
+Like a pop-up (floating) [Menu](menu.md), the MsgBox object is unusual in that it is strictly modal. It is created by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) in the normal way, but at that stage is invisible and inactive. It is activated ONLY when [`⎕DQ`](../../../language-reference-guide/system-functions/dq) is called with the name of the MsgBox as the argument. When this is done, the MsgBox object pops up and is activated. Because there is no other object specified in the argument to [`⎕DQ`](../../../language-reference-guide/system-functions/dq), all other objects are de-activated. The only thing that the user can do (within the APL application) is to press one of the buttons in the MsgBox. When this happens, the MsgBox automatically pops down, the callback function (if any) is fired, and then [`⎕DQ`](../../../language-reference-guide/system-functions/dq) terminates.
Notice that the position and size of the MsgBox are determined by Windows and are fixed, although the MsgBox may be moved by the user after it has been displayed.
diff --git a/object-reference/docs/objects/richedit.md b/object-reference/docs/objects/richedit.md
index 659d22fcacd..af56c06bedd 100644
--- a/object-reference/docs/objects/richedit.md
+++ b/object-reference/docs/objects/richedit.md
@@ -12,7 +12,7 @@ The [File](../properties/file.md) property specifies the name of a file associat
The [Text](../properties/text.md) property may be used to set or retrieve the text of the RichEdit, but ignores formatting information. [Text](../properties/text.md) may set using a simple character vector, a simple matrix, or a vector of vectors. If [Text](../properties/text.md) is specified by a matrix or by a vector of vectors, "new-line" characters are automatically added at the end of each line in the RichEdit control.
-The user may insert a "new-line" character in the text by pressing Ctrl-Enter. If [Text](../properties/text.md) was set by a matrix, it is returned as a matrix. Otherwise it is returned as a vector of vectors. "New-line" characters are not returned. If [Text](../properties/text.md) was not specified by [`⎕WC`](../../../language-reference-guide/system-functions/wc) or [`⎕WS` ](../../../language-reference-guide/system-functions/ws)it is returned an empty matrix (`1 0⍴''`).
+The user may insert a "new-line" character in the text by pressing Ctrl-Enter. If [Text](../properties/text.md) was set by a matrix, it is returned as a matrix. Otherwise it is returned as a vector of vectors. "New-line" characters are not returned. If [Text](../properties/text.md) was not specified by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) or [`⎕WS` ](../../../language-reference-guide/system-functions/ws-dyadic)it is returned an empty matrix (`1 0⍴''`).
The [RTFText](../properties/rtftext.md) property may be used to set or retrieve the contents of the RichEdit, including text and formatting.
diff --git a/object-reference/docs/objects/root.md b/object-reference/docs/objects/root.md
index cf4ca1cdcc5..2a6a3c05b39 100644
--- a/object-reference/docs/objects/root.md
+++ b/object-reference/docs/objects/root.md
@@ -4,13 +4,13 @@
**Description**
-There is a single Root object called `'.'` which is always present. It cannot be created using [`⎕WC`](../../../language-reference-guide/system-functions/wc) nor can it be destroyed.
+There is a single Root object called `'.'` which is always present. It cannot be created using [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) nor can it be destroyed.
The [Caption](../properties/caption.md) and [IconObj](../properties/iconobj.md) properties of `'.'` are used to identify a Dyalog APL/W application as distinct from the APL Session. The [Caption](../properties/caption.md) property specifies the application name that is displayed when you cycle through running applications using Alt+Tab and by the Windows Task List. The [IconObj](../properties/iconobj.md) property specifies the name of an [Icon](icon.md) object that is displayed alongside the application name in the box displayed by Alt+Tab. For these to take effect, your application must have at least one visible and active [Form](form.md).
For the Root object, the value of [Posn](../properties/posn.md) is (0,0). The value of [Size](../properties/size.md) is either (100,100) if [Coord](../properties/coord.md) is `'Prop'`, or the size of the screen in pixels if [Coord](../properties/coord.md) is `'Pixel'`. [XRange](../properties/xrange.md) and [YRange](../properties/yrange.md) both have the value (0,100). The [DevCaps](../properties/devcaps.md) property reports the physical size of the screen in terms of both pixels and millimetres. It also reports the number of colours available.
-The [FontList](../properties/fontlist.md) property provides a list of all the character fonts that are available. The [PrintList](../properties/printlist.md) property provides a list of all the installed printers. These properties are *read-only* and may not be changed using [`⎕WS`](../../../language-reference-guide/system-functions/ws)
+The [FontList](../properties/fontlist.md) property provides a list of all the character fonts that are available. The [PrintList](../properties/printlist.md) property provides a list of all the installed printers. These properties are *read-only* and may not be changed using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic)
As the default value of [Coord](../properties/coord.md) is `'Inherit'` for all other objects, the value of [Coord](../properties/coord.md) for `'.'` defines the default co-ordinate system. It may be either `'Prop'` (the default) or `'Pixel'`. `'Inherit'` and `'User'` are not allowed.
diff --git a/object-reference/docs/objects/scroll.md b/object-reference/docs/objects/scroll.md
index eea18186487..cc2dc42f4cf 100644
--- a/object-reference/docs/objects/scroll.md
+++ b/object-reference/docs/objects/scroll.md
@@ -26,7 +26,7 @@ The [Align](../properties/align.md) property is a character vector containing `'
Note that the default value of [Align](../properties/align.md) is `'Right'` unless [HScroll](../properties/hscroll.md) is set to `¯1` in which case it is `'Bottom'`. It must therefore be explicitly set to `'None'` if you want a non-attached "free-standing" scrollbar.
-[VScroll](../properties/vscroll.md) and [HScroll](../properties/hscroll.md) are used to specify the orientation of the scrollbar explicitly, usually in conjunction with [Align](../properties/align.md) set to `'None'`. [VScroll](../properties/vscroll.md) or [HScroll](../properties/hscroll.md) may be specified when the object is created by [`⎕WC`](../../../language-reference-guide/system-functions/wc), but cannot be changed using [`⎕WS`](../../../language-reference-guide/system-functions/ws). The two properties are mutually exclusive. Each of them may be set to 0 or `¯1`, where `¯1` means "true" and 0 means "false". Thus ([VScroll](../properties/vscroll.md)`¯1`) defines a vertical scrollbar, while ([HScroll](../properties/hscroll.md)`¯1`) specifies a horizontal one. Setting either property to `¯1` automatically causes the other to be set to 0. If you try to set both to `¯1`, [VScroll](../properties/vscroll.md) takes precedence and [HScroll](../properties/hscroll.md) is reset to 0.
+[VScroll](../properties/vscroll.md) and [HScroll](../properties/hscroll.md) are used to specify the orientation of the scrollbar explicitly, usually in conjunction with [Align](../properties/align.md) set to `'None'`. [VScroll](../properties/vscroll.md) or [HScroll](../properties/hscroll.md) may be specified when the object is created by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic), but cannot be changed using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic). The two properties are mutually exclusive. Each of them may be set to 0 or `¯1`, where `¯1` means "true" and 0 means "false". Thus ([VScroll](../properties/vscroll.md)`¯1`) defines a vertical scrollbar, while ([HScroll](../properties/hscroll.md)`¯1`) specifies a horizontal one. Setting either property to `¯1` automatically causes the other to be set to 0. If you try to set both to `¯1`, [VScroll](../properties/vscroll.md) takes precedence and [HScroll](../properties/hscroll.md) is reset to 0.
[Note: the reason for using two properties where one would be sufficient is to allow for the possible future implementation of scrolling groups as provided by `⎕SM`/`⎕SR`.]
diff --git a/object-reference/docs/properties/align.md b/object-reference/docs/properties/align.md
index 47e244730b8..2a4ca7c796e 100644
--- a/object-reference/docs/properties/align.md
+++ b/object-reference/docs/properties/align.md
@@ -32,7 +32,7 @@ The default value of Align is `'Right'` for a vertical [Scroll](../objects/scrol
For a [Scroll](../objects/scroll.md) object, Align also determines the direction of a [Scroll](../objects/scroll.md) object unless it is overridden by setting [HScroll](hscroll.md) or [VScroll](vscroll.md) directly. If neither [HScroll](hscroll.md) or VScroll is defined and Align is `'Top'` or `'Bottom'`, a horizontal scrollbar is provided. If neither [HScroll](hscroll.md) or [VScroll](vscroll.md) is defined and Align is `'None'`, `'Left'` or `'Right'`, a vertical scrollbar is provided.
!!! note
- The value of the Align property may **only** be assigned by [`⎕WC`](../../../language-reference-guide/system-functions/wc) and may **not** be changed using [`⎕WS`](../../../language-reference-guide/system-functions/ws).
+ The value of the Align property may **only** be assigned by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) and may **not** be changed using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic).
**Application**
diff --git a/object-reference/docs/properties/border.md b/object-reference/docs/properties/border.md
index 95daf15052f..a966deb7704 100644
--- a/object-reference/docs/properties/border.md
+++ b/object-reference/docs/properties/border.md
@@ -8,7 +8,7 @@ For a [Form](../objects/form.md) or [SubForm](../objects/subform.md), the value
## Note
-The value of the Border property may only be assigned by [`⎕WC`](../../../language-reference-guide/system-functions/wc) and may **not** be changed using [`⎕WS`](../../../language-reference-guide/system-functions/ws).
+The value of the Border property may only be assigned by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) and may **not** be changed using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic).
**Application**
diff --git a/object-reference/docs/properties/btns.md b/object-reference/docs/properties/btns.md
index f9a0edf8b7e..32eb2957e1b 100644
--- a/object-reference/docs/properties/btns.md
+++ b/object-reference/docs/properties/btns.md
@@ -20,7 +20,7 @@ Under Windows, the Btns property may specify one of **six** sets of buttons as f
- `'ABORT 'RETRY' 'IGNORE'`
-If any other combination is specified, [`⎕WC`](../../../language-reference-guide/system-functions/wc) and [`⎕WS`](../../../language-reference-guide/system-functions/ws) will report a `DOMAIN ERROR`. The names of the buttons are however case-insensitive, so the system will accept `'ok'`, `'Ok'`, `'oK'` or `'OK'`.
+If any other combination is specified, [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) and [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic) will report a `DOMAIN ERROR`. The names of the buttons are however case-insensitive, so the system will accept `'ok'`, `'Ok'`, `'oK'` or `'OK'`.
If the Btns property is not specified, it assumes a default according to [Style](style.md) as follows :
diff --git a/object-reference/docs/properties/cellselect.md b/object-reference/docs/properties/cellselect.md
index fd5b61b8d05..3004cad5e32 100644
--- a/object-reference/docs/properties/cellselect.md
+++ b/object-reference/docs/properties/cellselect.md
@@ -27,7 +27,7 @@ Setting CellSelect to (`'Rows' 'Columns' 'Whole' 'Partial'`) is equivalent to se
When the user performs a selection, the [Grid](../objects/grid.md) generates a [GridSelect](../methodorevents/gridselect.md) event.
-The range of cells currently selected is given by the [SelItems](selitems.md) property. You can obtain the current selection by querying this property with [`⎕WG`](../../../language-reference-guide/system-functions/wg) and you can set it with [`⎕WS`](../../../language-reference-guide/system-functions/ws).
+The range of cells currently selected is given by the [SelItems](selitems.md) property. You can obtain the current selection by querying this property with [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic) and you can set it with [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic).
Note that the user may delete the contents of the selected range, or cut and copy them to the clipboard by pressing Delete, Shift+Delete or Ctrl+Insert respectively. The user may also replace the current selection with the contents of the clipboard by pressing Shift+Insert. These operations generate [GridDelete](../methodorevents/griddelete.md), [GridCut](../methodorevents/gridcut.md), [GridCopy](../methodorevents/gridcopy.md) and [GridPaste](../methodorevents/gridpaste.md) events which you may disable (by setting the event action code to `¯1` or to which you may attach a callback function.
diff --git a/object-reference/docs/properties/cmap.md b/object-reference/docs/properties/cmap.md
index 7eebec19f57..fcd2f164c85 100644
--- a/object-reference/docs/properties/cmap.md
+++ b/object-reference/docs/properties/cmap.md
@@ -8,7 +8,7 @@ Please note that [Bits](bits.md) and CMap may **only** be used to represent an i
When you create a [Bitmap](../objects/bitmap.md) or [Icon](../objects/icon.md) by specifying [Bits](bits.md) and CMap, the actual colours you obtain are not necessarily those that you specified. This is partly due to hardware restrictions and partly due to the way in which Windows manages colours. Firstly, your display adapter and driver limit the number of pure colours that can be displayed at any one time and therefore define a maximum size for the colour map. For example, on a **standard** VGA you are limited to 16 different pure colours (additional ones are provided by **dithering**).
-Secondly, Windows reserves a certain number of colours in the colour map for its own use. When an application requests a new colour (that is, one that is not already installed in the colour map), MS-Windows either assigns it to a spare entry, or allocates the **closest match** if the colour map is full. The value of [Bits](bits.md) and CMap after [`⎕WC`](../../../language-reference-guide/system-functions/wc) reflect the actual colours allocated and may bear little resemblance to the values you assigned to these properties initially.
+Secondly, Windows reserves a certain number of colours in the colour map for its own use. When an application requests a new colour (that is, one that is not already installed in the colour map), MS-Windows either assigns it to a spare entry, or allocates the **closest match** if the colour map is full. The value of [Bits](bits.md) and CMap after [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) reflect the actual colours allocated and may bear little resemblance to the values you assigned to these properties initially.
Note that if you are running 16 colours, MS-Windows reserves all 16 entries in the colour map for its own use. This means that on a 16-colour system, you **cannot** use any colours other than the default ones reserved by MS-Windows. In practice, the "standard" 16-colour CMap is shown in the following table.
diff --git a/object-reference/docs/properties/coord.md b/object-reference/docs/properties/coord.md
index eff2f88e627..a5f7342310d 100644
--- a/object-reference/docs/properties/coord.md
+++ b/object-reference/docs/properties/coord.md
@@ -10,7 +10,7 @@ string with one of the following values; `'Inherit'`,
If Coord is `'Inherit'`, the co-ordinate
system for the object is **inherited** from its parent. Note that the default
value of Coord for the system object `'.'` is `'Prop'`, so by default all objects
-created by [`⎕WC`](../../../language-reference-guide/system-functions/wc) inherit `'Prop'`.
+created by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) inherit `'Prop'`.
If Coord is `'Prop'`, the origin of the
object's parent is deemed to be at its top left interior corner, and the scale
diff --git a/object-reference/docs/properties/dirty.md b/object-reference/docs/properties/dirty.md
index 0849a40a7f6..7580b4a4c9a 100644
--- a/object-reference/docs/properties/dirty.md
+++ b/object-reference/docs/properties/dirty.md
@@ -2,7 +2,7 @@
**Description**
-The Dirty property indicates whether the current page is considered to have content (either because [`⎕WC`](../../../language-reference-guide/system-functions/wc) has been used to write to it, or [PagesBeginDirty](pagesbegindirty.md) is set to `1`).
+The Dirty property indicates whether the current page is considered to have content (either because [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) has been used to write to it, or [PagesBeginDirty](pagesbegindirty.md) is set to `1`).
Dirty can be set to `1` to force an otherwise empty page to be printed (for example, if PagesBeginDirty has been set to `0`).
diff --git a/object-reference/docs/properties/formats.md b/object-reference/docs/properties/formats.md
index 30bbf0e1db0..0f6015622fc 100644
--- a/object-reference/docs/properties/formats.md
+++ b/object-reference/docs/properties/formats.md
@@ -2,7 +2,7 @@
**Description**
-This is a "read-only" property that identifies the formats in which data is currently available in the clipboard. It is a vector of character vectors containing the names of the corresponding [Clipboard](../objects/clipboard.md) properties for which data may be obtained using [`⎕WG`](../../../language-reference-guide/system-functions/wg). In the following example data was copied to the Windows clipboard from Microsoft Excel. This product stores data in CF_Text and the older device-dependent CF_Bitmap formats. The latter excludes colour map information, so [CMap](cmap.md) is not available.
+This is a "read-only" property that identifies the formats in which data is currently available in the clipboard. It is a vector of character vectors containing the names of the corresponding [Clipboard](../objects/clipboard.md) properties for which data may be obtained using [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic). In the following example data was copied to the Windows clipboard from Microsoft Excel. This product stores data in CF_Text and the older device-dependent CF_Bitmap formats. The latter excludes colour map information, so [CMap](cmap.md) is not available.
```apl
'CL' ⎕WC 'Clipboard'
'CL' ⎕WG 'Formats'
diff --git a/object-reference/docs/properties/index-property.md b/object-reference/docs/properties/index-property.md
index 503251450fd..f45493f5f04 100644
--- a/object-reference/docs/properties/index-property.md
+++ b/object-reference/docs/properties/index-property.md
@@ -2,7 +2,7 @@
**Description**
-For a [List](../objects/list.md) and a [Combo](../objects/combo.md) with [Style](style.md) `'Simple'`, this property specifies the position of the data in the list box as a positive integer value. If Index has the value "n", it means that the "nth" item in [Items](items.md) is displayed on the top line in the list box. The value of Index is dependent upon the value of `⎕IO`. Note that Index for a [Combo](../objects/combo.md) or [List](../objects/list.md) cannot be set using [`⎕WC`](../../../language-reference-guide/system-functions/wc). The value of Index in a [Combo](../objects/combo.md) with a drop-down list box ([Style](style.md) `'Drop'` or `'DropEdit'`) is always equal to `⎕IO`.
+For a [List](../objects/list.md) and a [Combo](../objects/combo.md) with [Style](style.md) `'Simple'`, this property specifies the position of the data in the list box as a positive integer value. If Index has the value "n", it means that the "nth" item in [Items](items.md) is displayed on the top line in the list box. The value of Index is dependent upon the value of `⎕IO`. Note that Index for a [Combo](../objects/combo.md) or [List](../objects/list.md) cannot be set using [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic). The value of Index in a [Combo](../objects/combo.md) with a drop-down list box ([Style](style.md) `'Drop'` or `'DropEdit'`) is always equal to `⎕IO`.
For a [Grid](../objects/grid.md), Index is a 2-element vector that specifies the row and column number of the cell that is currently in the top left corner of the [Grid](../objects/grid.md).
diff --git a/object-reference/docs/properties/items.md b/object-reference/docs/properties/items.md
index 3c080bf4a79..074a57fbca1 100644
--- a/object-reference/docs/properties/items.md
+++ b/object-reference/docs/properties/items.md
@@ -10,7 +10,7 @@ An empty character vector is treated the same as a vector of blanks, and represe
A zero-length vector of vectors or an empty matrix represents 0 items. The default value for Items is an empty matrix.
-`⎕WG 'Items'` returns an array of the same structure as was assigned by [`⎕WC`](../../../language-reference-guide/system-functions/wc) or [`⎕WS`](../../../language-reference-guide/system-functions/ws).
+`⎕WG 'Items'` returns an array of the same structure as was assigned by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) or [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic).
**Application**
diff --git a/object-reference/docs/properties/maxlength.md b/object-reference/docs/properties/maxlength.md
index ce1b9d0d996..8244dc26a7a 100644
--- a/object-reference/docs/properties/maxlength.md
+++ b/object-reference/docs/properties/maxlength.md
@@ -2,7 +2,7 @@
**Description**
-This property specifies the maximum number of characters that the user may enter in a single-line [Edit](../objects/edit.md) object ( [Style](style.md) `'Single'`) or in the edit field associated with a [Spinner](../objects/spinner.md). It does not apply to a multi-line [Edit](../objects/edit.md) object ([Style ](style.md)`'Multi'`). MaxLength does not limit the length of the vector that you may assign to the [Text](text.md) property using [`⎕WC`](../../../language-reference-guide/system-functions/wc) or [`⎕WS`](../../../language-reference-guide/system-functions/ws). However, if you overfill the field in this way, the user must delete excess characters before the object will accept further input.
+This property specifies the maximum number of characters that the user may enter in a single-line [Edit](../objects/edit.md) object ( [Style](style.md) `'Single'`) or in the edit field associated with a [Spinner](../objects/spinner.md). It does not apply to a multi-line [Edit](../objects/edit.md) object ([Style ](style.md)`'Multi'`). MaxLength does not limit the length of the vector that you may assign to the [Text](text.md) property using [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) or [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic). However, if you overfill the field in this way, the user must delete excess characters before the object will accept further input.
**Application**
diff --git a/object-reference/docs/properties/mdiactive.md b/object-reference/docs/properties/mdiactive.md
index 89922a3faa2..50be841702c 100644
--- a/object-reference/docs/properties/mdiactive.md
+++ b/object-reference/docs/properties/mdiactive.md
@@ -2,7 +2,7 @@
**Description**
-This property contains the name of the [SubForm](../objects/subform.md) owned by the [MDIClient](../objects/mdiclient.md) that is currently active. Only one [SubForm](../objects/subform.md) may be active at a time. You can switch between [SubForm](../objects/subform.md)s in an MDI application under program control by setting this property with [`⎕WS`](../../../language-reference-guide/system-functions/ws). You can also do this by generating an [MDIActivate](../methodorevents/mdiactivate.md) event.
+This property contains the name of the [SubForm](../objects/subform.md) owned by the [MDIClient](../objects/mdiclient.md) that is currently active. Only one [SubForm](../objects/subform.md) may be active at a time. You can switch between [SubForm](../objects/subform.md)s in an MDI application under program control by setting this property with [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic). You can also do this by generating an [MDIActivate](../methodorevents/mdiactivate.md) event.
See also [MDIActiveObject](mdiactiveobject.md) property.
diff --git a/object-reference/docs/properties/metafileobj.md b/object-reference/docs/properties/metafileobj.md
index 406fe618ed1..1c78d918b1f 100644
--- a/object-reference/docs/properties/metafileobj.md
+++ b/object-reference/docs/properties/metafileobj.md
@@ -4,16 +4,16 @@
This property is used to copy graphical data to and from the Windows clipboard using the Windows Metafile format.
-When you set the MetafileObj property of a [Clipboard](../objects/clipboard.md) object to the name of the [Metafile](../objects/metafile.md) object using [`⎕WS`](../../../language-reference-guide/system-functions/ws) its contents are copied to the Windows clipboard in Windows Metafile format.
+When you set the MetafileObj property of a [Clipboard](../objects/clipboard.md) object to the name of the [Metafile](../objects/metafile.md) object using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic) its contents are copied to the Windows clipboard in Windows Metafile format.
-To import a picture that has been stored in the Windows clipboard in Metafile format you use [`⎕WG`](../../../language-reference-guide/system-functions/wg). This returns a nested array whose elements correspond to the graphical components of the picture. Each of the elements of the array may be used as the arguments of [`⎕WC`](../../../language-reference-guide/system-functions/wc) to draw the corresponding component of the picture. For example, if the picture stored in C:\MSOFFICE\CLIPART\BIRD.WMF is copied to the Windows clipboard, it may be imported into Dyalog APL/W as follows :
+To import a picture that has been stored in the Windows clipboard in Metafile format you use [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic). This returns a nested array whose elements correspond to the graphical components of the picture. Each of the elements of the array may be used as the arguments of [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) to draw the corresponding component of the picture. For example, if the picture stored in C:\MSOFFICE\CLIPART\BIRD.WMF is copied to the Windows clipboard, it may be imported into Dyalog APL/W as follows :
```apl
BIRD ← 'CL' ⎕WG 'MetafileObj'
⍴BIRD
4
```
-Each of the items in `BIRD` is a 2-element vector. The first element is a "dummy" object name which you may use or ignore as you wish. The second element is an array that defines a graphical object and is suitable as the right argument of [`⎕WC`](../../../language-reference-guide/system-functions/wc). For example :
+Each of the items in `BIRD` is a 2-element vector. The first element is a "dummy" object name which you may use or ignore as you wish. The second element is an array that defines a graphical object and is suitable as the right argument of [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic). For example :
```apl
2⊃4⊃BIRD
POLY 191 397 FSTYLE 0 FILLCOL 0 0 0 ...
diff --git a/object-reference/docs/properties/posn.md b/object-reference/docs/properties/posn.md
index 9d81c0e043f..ab77d11bb14 100644
--- a/object-reference/docs/properties/posn.md
+++ b/object-reference/docs/properties/posn.md
@@ -4,11 +4,11 @@
With the exception of [Menu](../objects/menu.md), [MenuItem](../objects/menuitem.md) and [Separator](../objects/separator.md) objects, Posn is a 2-element numeric vector specifying the y-position and x-position respectively of the top-left corner of the object relative to its parent. For a [Form](../objects/form.md), Posn specifies its position on the screen. The units are defined by the [Coord](coord.md) property.
-When specifying Posn for [`⎕WC`](../../../language-reference-guide/system-functions/wc), you can allow the y-position or x-position to assume a default value by giving the corresponding element a value of `⍬`.
+When specifying Posn for [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic), you can allow the y-position or x-position to assume a default value by giving the corresponding element a value of `⍬`.
-Using [`⎕WS`](../../../language-reference-guide/system-functions/ws), if you want to set the y-position, but not the x-position, or vice-versa, you should specify `⍬` for the item you don't want to change.
+Using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic), if you want to set the y-position, but not the x-position, or vice-versa, you should specify `⍬` for the item you don't want to change.
-For [Menu](../objects/menu.md), [MenuItem](../objects/menuitem.md) and [Separator](../objects/separator.md) objects, Posn is a single integer that specifies the position at which the object is to be **inserted** in its parent. For example, to add a new [MenuItem](../objects/menuitem.md) between the third and fourth items in an existing [Menu](../objects/menu.md), you would specify its Posn as 4. For these objects, the value of Posn returned by [`⎕WG`](../../../language-reference-guide/system-functions/wg) is the current index of the object within its parent.
+For [Menu](../objects/menu.md), [MenuItem](../objects/menuitem.md) and [Separator](../objects/separator.md) objects, Posn is a single integer that specifies the position at which the object is to be **inserted** in its parent. For example, to add a new [MenuItem](../objects/menuitem.md) between the third and fourth items in an existing [Menu](../objects/menu.md), you would specify its Posn as 4. For these objects, the value of Posn returned by [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic) is the current index of the object within its parent.
**Application**
diff --git a/object-reference/docs/properties/proplist.md b/object-reference/docs/properties/proplist.md
index 15f47dbad6e..90ba1491c56 100644
--- a/object-reference/docs/properties/proplist.md
+++ b/object-reference/docs/properties/proplist.md
@@ -2,7 +2,7 @@
**Description**
-This is a "read-only" property that supplies a list of all other properties which are applicable to the object in question. The list is returned as a vector of character vectors in the order in which the corresponding properties are expected by [`⎕WC`](../../../language-reference-guide/system-functions/wc) and [`⎕WS`](../../../language-reference-guide/system-functions/ws).
+This is a "read-only" property that supplies a list of all other properties which are applicable to the object in question. The list is returned as a vector of character vectors in the order in which the corresponding properties are expected by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) and [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic).
Example
```apl
diff --git a/object-reference/docs/properties/rows.md b/object-reference/docs/properties/rows.md
index 18baf3186d7..eddbf37c1bd 100644
--- a/object-reference/docs/properties/rows.md
+++ b/object-reference/docs/properties/rows.md
@@ -4,7 +4,7 @@
For [Combo](../objects/combo.md) objects with [Style](style.md)`'Drop'` or `'DropEdit'` this property determines the number of rows displayed in the drop-down listbox when it is displayed. Note that the height of the edit field of a [Combo](../objects/combo.md) of this type is dependent only upon the size of the font in use, and cannot otherwise be changed.
-Rows is a "read-only" property for a [Combo](../objects/combo.md) with [Style ](style.md)`'Simple'` and an attempt to set it in a [Combo](../objects/combo.md) of this type with [`⎕WC`](../../../language-reference-guide/system-functions/wc) or [`⎕WS`](../../../language-reference-guide/system-functions/ws) will generate a `NONCE ERROR`. Instead, the overall height of a Simple [Combo](../objects/combo.md) is determined by the first element of the [Size](size.md) property.
+Rows is a "read-only" property for a [Combo](../objects/combo.md) with [Style ](style.md)`'Simple'` and an attempt to set it in a [Combo](../objects/combo.md) of this type with [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) or [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic) will generate a `NONCE ERROR`. Instead, the overall height of a Simple [Combo](../objects/combo.md) is determined by the first element of the [Size](size.md) property.
**Application**
diff --git a/object-reference/docs/properties/sizeable.md b/object-reference/docs/properties/sizeable.md
index b352616a7d7..ac8ea41b490 100644
--- a/object-reference/docs/properties/sizeable.md
+++ b/object-reference/docs/properties/sizeable.md
@@ -2,13 +2,13 @@
**Description**
-This property determines whether or not an object can be directly resized by the user once it has been created by [`⎕WC`](../../../language-reference-guide/system-functions/wc).
+This property determines whether or not an object can be directly resized by the user once it has been created by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic).
It is a single number with the value 0 (the object cannot be resized by the user) or 1 (the object may be resized by the user). The default is 1.
-For a [Form](../objects/form.md) , [HTMLRenderer](../objects/htmlrenderer.md) or [SubForm](../objects/subform.md), the Sizeable property may only be set by [`⎕WC`](../../../language-reference-guide/system-functions/wc) and cannot subsequently be altered using [`⎕WS`](../../../language-reference-guide/system-functions/ws). An attempt to do so generates a `NONCE ERROR`. For a [Form](../objects/form.md) or [HTMLRenderer](../objects/htmlrenderer.md), the default value is 1 and the object occupies a standard resizeable window with a border. Note that the value of Sizeable is independent of the values of the [MaxButton](maxbutton.md) and [MinButton](minbutton.md) properties, so that a [Form](../objects/form.md) or [HTMLRenderer](../objects/htmlrenderer.md) with [MaxButton](maxbutton.md) 1 can be maximised even though its Sizeable property is 0.
+For a [Form](../objects/form.md) , [HTMLRenderer](../objects/htmlrenderer.md) or [SubForm](../objects/subform.md), the Sizeable property may only be set by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) and cannot subsequently be altered using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic). An attempt to do so generates a `NONCE ERROR`. For a [Form](../objects/form.md) or [HTMLRenderer](../objects/htmlrenderer.md), the default value is 1 and the object occupies a standard resizeable window with a border. Note that the value of Sizeable is independent of the values of the [MaxButton](maxbutton.md) and [MinButton](minbutton.md) properties, so that a [Form](../objects/form.md) or [HTMLRenderer](../objects/htmlrenderer.md) with [MaxButton](maxbutton.md) 1 can be maximised even though its Sizeable property is 0.
-For other objects, the default value of the Sizeable property is 0. However, setting it to 1 (which may be done dynamically using [`⎕WS`](../../../language-reference-guide/system-functions/ws)) allows the user to resize it with the mouse.
+For other objects, the default value of the Sizeable property is 0. However, setting it to 1 (which may be done dynamically using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic)) allows the user to resize it with the mouse.
In all these cases, when the user resizes an object, the object will generate a [Configure](../methodorevents/configure.md) (31) event.
diff --git a/object-reference/docs/properties/state.md b/object-reference/docs/properties/state.md
index 28f05c096aa..5576d55b05e 100644
--- a/object-reference/docs/properties/state.md
+++ b/object-reference/docs/properties/state.md
@@ -8,7 +8,7 @@ If the [Style](style.md) property is `'Push'`, a State of 0 means that the pushb
If the [Style](style.md) property is `'Radio'` or `'Check'`, 0 means "not selected" and 1 means "selected". Note that only one of a group of buttons with [Style ](style.md)`'Radio'` that share the same parent may have State 1. Setting State to 1 automatically deselects all the others in the group.
-For a [Form](../objects/form.md) or [SubForm](../objects/subform.md), a value of State of 0 means that the [Form](../objects/form.md) is currently displayed in its "normal" state. 1 means that the [Form](../objects/form.md) is currently minimised (displayed as an icon). The value 2 indicates that the [Form](../objects/form.md) is maximised and displayed full-screen. The State of a [Form](../objects/form.md) can be changed using [`⎕WS`](../../../language-reference-guide/system-functions/ws).
+For a [Form](../objects/form.md) or [SubForm](../objects/subform.md), a value of State of 0 means that the [Form](../objects/form.md) is currently displayed in its "normal" state. 1 means that the [Form](../objects/form.md) is currently minimised (displayed as an icon). The value 2 indicates that the [Form](../objects/form.md) is maximised and displayed full-screen. The State of a [Form](../objects/form.md) can be changed using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic).
**Application**
diff --git a/object-reference/docs/properties/text.md b/object-reference/docs/properties/text.md
index f7fed902f34..44449806a29 100644
--- a/object-reference/docs/properties/text.md
+++ b/object-reference/docs/properties/text.md
@@ -12,9 +12,9 @@ Note that if word-wrapping is in effect in a multi-line [Edit](../objects/edit.m
In a [Text](../objects/text.md) object, the value of the Text property may be a simple scalar, an enclosed vector or matrix, a simple vector, a simple matrix, or a vector of enclosed vectors or matrices.
-In general, the value of Text returned by [`⎕WG`](../../../language-reference-guide/system-functions/wg) has the same structure that was assigned to it by [`⎕WC`](../../../language-reference-guide/system-functions/wc) or by the most recent call to [`⎕WS`](../../../language-reference-guide/system-functions/ws). New-Line characters entered by the users are removed.
+In general, the value of Text returned by [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic) has the same structure that was assigned to it by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) or by the most recent call to [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic). New-Line characters entered by the users are removed.
-You can copy text into the Windows [Clipboard](../objects/clipboard.md) by using [`⎕WS`](../../../language-reference-guide/system-functions/ws) to set Text for a [Clipboard](../objects/clipboard.md) object. In this case you may specify a simple character scalar, vector or matrix, or a vector of character vectors. If you are retrieving data from the clipboard that has been stored by another application, Text will be either a character vector or a vector of character vectors.
+You can copy text into the Windows [Clipboard](../objects/clipboard.md) by using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic) to set Text for a [Clipboard](../objects/clipboard.md) object. In this case you may specify a simple character scalar, vector or matrix, or a vector of character vectors. If you are retrieving data from the clipboard that has been stored by another application, Text will be either a character vector or a vector of character vectors.
The Text property of a [StatusField](../objects/statusfield.md) is updated automatically if its [Style](style.md) property is set to monitor the status of a key.
diff --git a/object-reference/docs/properties/textsize.md b/object-reference/docs/properties/textsize.md
index 349768d607f..bc56d71a36d 100644
--- a/object-reference/docs/properties/textsize.md
+++ b/object-reference/docs/properties/textsize.md
@@ -6,7 +6,7 @@ This property has been replaced by the [GetTextSize](../methodorevents/gettextsi
TextSize is a "read-only" property that reports the size of the bounding rectangle of a text item in a given font. The result is given in the co-ordinate system of the object in question. This property is useful for positioning [Text](../objects/text.md) objects.
-When you query TextSize you give the text item in whose size you are interested and, optionally, the name of a [Font](../objects/font.md) object. The text item may be a simple scalar, a vector or a matrix. If the [Font](../objects/font.md) is omitted, the result is given using the current font for the object in question. When you query TextSize on its own, you must enclose the argument to [`⎕WG`](../../../language-reference-guide/system-functions/wg). This is because APL would otherwise not be able to distinguish between the text string and font name associated with `'TextSize'` and other properties with the same name as these items.
+When you query TextSize you give the text item in whose size you are interested and, optionally, the name of a [Font](../objects/font.md) object. The text item may be a simple scalar, a vector or a matrix. If the [Font](../objects/font.md) is omitted, the result is given using the current font for the object in question. When you query TextSize on its own, you must enclose the argument to [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic). This is because APL would otherwise not be able to distinguish between the text string and font name associated with `'TextSize'` and other properties with the same name as these items.
Examples
```apl
diff --git a/object-reference/docs/properties/type.md b/object-reference/docs/properties/type.md
index 85ae51e732b..57e62402c5c 100644
--- a/object-reference/docs/properties/type.md
+++ b/object-reference/docs/properties/type.md
@@ -2,7 +2,7 @@
**Description**
-This property determines the type of an object. Its value is a character vector containing a valid object type. The Type property is set by [`⎕WC`](../../../language-reference-guide/system-functions/wc) and reported by [`⎕WG`](../../../language-reference-guide/system-functions/wg), but may not be altered using [`⎕WS`](../../../language-reference-guide/system-functions/ws).
+This property determines the type of an object. Its value is a character vector containing a valid object type. The Type property is set by [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic) and reported by [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic), but may not be altered using [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic).
**Application**
diff --git a/object-reference/docs/properties/visible.md b/object-reference/docs/properties/visible.md
index 547e0325fab..1932933221d 100644
--- a/object-reference/docs/properties/visible.md
+++ b/object-reference/docs/properties/visible.md
@@ -4,7 +4,7 @@
This property specifies whether or not an object is currently visible. It is a single number with the value 0 (object is invisible) or 1 (object is visible). The default is 1. Setting Visible on and off is a way to pop a dialog box up and down as required.
-Note that an invisible object is not necessarily inactive, and is capable of generating events. For example, a [Button](../objects/button.md) with a [Cancel](cancel.md) property of 1 will generate a [Select](../methodorevents/select.md) (30) event (if enabled) whether or not it is visible. An invisible object will also respond to methods and events sent to it by [`⎕NQ`](../../../language-reference-guide/system-functions/nq).
+Note that an invisible object is not necessarily inactive, and is capable of generating events. For example, a [Button](../objects/button.md) with a [Cancel](cancel.md) property of 1 will generate a [Select](../methodorevents/select.md) (30) event (if enabled) whether or not it is visible. An invisible object will also respond to methods and events sent to it by [`⎕NQ`](../../../language-reference-guide/system-functions/nq-monadic).
**Application**
diff --git a/object-reference/docs/properties/yield.md b/object-reference/docs/properties/yield.md
index 0d5e8e0f3be..ef694532b3d 100644
--- a/object-reference/docs/properties/yield.md
+++ b/object-reference/docs/properties/yield.md
@@ -6,7 +6,7 @@ This property determines how frequently Dyalog checks the windows message queue.
The value of Yield is an integer expressed in 1/1000's of a second. Its default value is 200. Yield defines the period of time allowed to elapse between the execution of successive lines of APL code before APL yields to Windows by requesting a message from the Windows queue. If Yield is set to zero APL does not explicitly yield.
-Note that the value of this property only controls the yield frequency when APL is executing user-defined code. APL may also yield implicitly during [`⎕DQ`](../../../language-reference-guide/system-functions/dq), [`⎕NQ`](../../../language-reference-guide/system-functions/nq), [`⎕WC`](../../../language-reference-guide/system-functions/wc), `⎕SR`, [`⎕WS`](../../../language-reference-guide/system-functions/ws) and [`⎕WG`](../../../language-reference-guide/system-functions/wg) and in communicating with Auxiliary processors. Note that setting Yield to 0 (or to a very high value) during the execution of code that does not implicitly yield will effectively de-activate all other applications (including Program manager) and disable APL interrupts (Ctrl+Break). It should therefore be used with extreme caution.
+Note that the value of this property only controls the yield frequency when APL is executing user-defined code. APL may also yield implicitly during [`⎕DQ`](../../../language-reference-guide/system-functions/dq), [`⎕NQ`](../../../language-reference-guide/system-functions/nq-monadic), [`⎕WC`](../../../language-reference-guide/system-functions/wc-dyadic), `⎕SR`, [`⎕WS`](../../../language-reference-guide/system-functions/ws-dyadic) and [`⎕WG`](../../../language-reference-guide/system-functions/wg-dyadic) and in communicating with Auxiliary processors. Note that setting Yield to 0 (or to a very high value) during the execution of code that does not implicitly yield will effectively de-activate all other applications (including Program manager) and disable APL interrupts (Ctrl+Break). It should therefore be used with extreme caution.
**Application**
diff --git a/programming-reference-guide/docs/error-messages/file-component-damaged.md b/programming-reference-guide/docs/error-messages/file-component-damaged.md
index 9a0887c69b3..187bfeb1f55 100644
--- a/programming-reference-guide/docs/error-messages/file-component-damaged.md
+++ b/programming-reference-guide/docs/error-messages/file-component-damaged.md
@@ -2,4 +2,4 @@
# FILE COMPONENT DAMAGED `38`
-This report is given if an attempt is made to access a component that is not a valid APL object. This will rarely occur, but may happen as a result of a previous computer system failure. Components files may be checked using `⎕FCHK`. See [File Check and Repair ](../../../language-reference-guide/system-functions/fchk).
+This report is given if an attempt is made to access a component that is not a valid APL object. This will rarely occur, but may happen as a result of a previous computer system failure. Components files may be checked using `⎕FCHK`. See [File Check and Repair ](../../../language-reference-guide/system-functions/fchk-monadic).
diff --git a/programming-reference-guide/docs/error-messages/file-damaged.md b/programming-reference-guide/docs/error-messages/file-damaged.md
index b3fe8824533..ac783cc8404 100644
--- a/programming-reference-guide/docs/error-messages/file-damaged.md
+++ b/programming-reference-guide/docs/error-messages/file-damaged.md
@@ -2,4 +2,4 @@
# FILE DAMAGED `23`
-This report is given if a component file becomes damaged. This rarely occurs but may result from a computer system failure. Components files may be checked using `⎕FCHK`. See [File Check and Repair ](../../../language-reference-guide/system-functions/fchk).
+This report is given if a component file becomes damaged. This rarely occurs but may result from a computer system failure. Components files may be checked using `⎕FCHK`. See [File Check and Repair ](../../../language-reference-guide/system-functions/fchk-monadic).
diff --git a/programming-reference-guide/docs/error-messages/file-system-error.md b/programming-reference-guide/docs/error-messages/file-system-error.md
index 2ae06702ce0..e118b5e8bd6 100644
--- a/programming-reference-guide/docs/error-messages/file-system-error.md
+++ b/programming-reference-guide/docs/error-messages/file-system-error.md
@@ -4,4 +4,4 @@
This report is given if an input/output (I/O) error occurs when reading from or writing to the host file system. Contact your System Administrator.
-If this occurs when the file is being written it may become damaged; it is therefore advisable to check the integrity of the file using `⎕FCHK` once the source of the I/O errors has been corrected. See [File Check and Repair ](../../../language-reference-guide/system-functions/fchk).
+If this occurs when the file is being written it may become damaged; it is therefore advisable to check the integrity of the file using `⎕FCHK` once the source of the I/O errors has been corrected. See [File Check and Repair ](../../../language-reference-guide/system-functions/fchk-monadic).
diff --git a/programming-reference-guide/docs/introduction/arrays/display-of-arrays.md b/programming-reference-guide/docs/introduction/arrays/display-of-arrays.md
index c7bfa648d5d..594ed4a57d6 100644
--- a/programming-reference-guide/docs/introduction/arrays/display-of-arrays.md
+++ b/programming-reference-guide/docs/introduction/arrays/display-of-arrays.md
@@ -161,8 +161,8 @@ The following approaches produce character data from an array rather than displa
|--------|-------------|------------------------|
| [`⍕`](../../../../language-reference-guide/primitive-functions/format/) | Character array identical to normal session display using `⎕←` | Yes |
| ([`⎕FMT`](../../../../language-reference-guide/system-functions/format-monadic/)) | Character matrix similar to session display using `⍞←` | Yes |
-| [`⎕JSON`](../../../../language-reference-guide/system-functions/json/) export | Conversion to a JSON character vector | No |
-| [`⎕CSV`](../../../../language-reference-guide/system-functions/csv/) export | Conversion to a CSV array or file | No |
+| [`⎕JSON`](../../../../language-reference-guide/system-functions/json-monadic/) export | Conversion to a JSON character vector | No |
+| [`⎕CSV`](../../../../language-reference-guide/system-functions/csv-monadic/) export | Conversion to a CSV array or file | No |
## Print Width
diff --git a/programming-reference-guide/docs/introduction/namespaces/namespace-syntax.md b/programming-reference-guide/docs/introduction/namespaces/namespace-syntax.md
index 41bb49c937d..64a91830300 100644
--- a/programming-reference-guide/docs/introduction/namespaces/namespace-syntax.md
+++ b/programming-reference-guide/docs/introduction/namespaces/namespace-syntax.md
@@ -48,7 +48,7 @@ There are two special space names:
UTIL.⍎STRING ⍝ Execute STRING in UTIL space
```
-You may also reference a function or operator in a namespace *implicitly* using the mechanism provided by `⎕EXPORT` (See [Language Reference](../../../../language-reference-guide/system-functions/export)) and `⎕PATH`. If you reference a name that is undefined in the current space, the system searches for it in the list of exported names defined for the namespaces specified by `⎕PATH`. See [Language Reference](../../../../language-reference-guide/system-functions/path) for further details.
+You may also reference a function or operator in a namespace *implicitly* using the mechanism provided by `⎕EXPORT` (See [Language Reference](../../../../language-reference-guide/system-functions/export-dyadic)) and `⎕PATH`. If you reference a name that is undefined in the current space, the system searches for it in the list of exported names defined for the namespaces specified by `⎕PATH`. See [Language Reference](../../../../language-reference-guide/system-functions/path) for further details.
Notice that the expression to the right of a dot may be arbitrarily complex and will be executed within the namespace or ref to the left of the dot.
```apl
diff --git a/programming-reference-guide/docs/threads/multithreading-language-elements.md b/programming-reference-guide/docs/threads/multithreading-language-elements.md
index b5614a508b3..a9f8108d312 100644
--- a/programming-reference-guide/docs/threads/multithreading-language-elements.md
+++ b/programming-reference-guide/docs/threads/multithreading-language-elements.md
@@ -3,7 +3,7 @@
The following language elements are provided to support threads.
- Primitive operator, spawn: [`&`](../../../language-reference-guide/primitive-operators/spawn/).
-- System functions: [`⎕TID`](../../../language-reference-guide/system-functions/tid/), [`⎕TCNUMS`](../../../language-reference-guide/system-functions/tcnums/), [`⎕TNUMS`](../../../language-reference-guide/system-functions/tnums/), [`⎕TKILL`](../../../language-reference-guide/system-functions/tkill/), [`⎕TSYNC`](../../../language-reference-guide/system-functions/tsync/).
+- System functions: [`⎕TID`](../../../language-reference-guide/system-functions/tid/), [`⎕TCNUMS`](../../../language-reference-guide/system-functions/tcnums/), [`⎕TNUMS`](../../../language-reference-guide/system-functions/tnums/), [`⎕TKILL`](../../../language-reference-guide/system-functions/tkill-monadic/), [`⎕TSYNC`](../../../language-reference-guide/system-functions/tsync/).
- An extension to the GUI [Event](../../..//object-reference/properties/event/#asynchronous-callback-function-name-followed-by) syntax to allow asynchronous callbacks.
- A control structure: [`:Hold`](../defined-functions-and-operators/traditional-functions-and-operators/control-structures/hold.md).
- System commands: [`)HOLDS`](../../../language-reference-guide/system-commands/holds/), [`)TID`](../../../language-reference-guide/system-commands/tid/).
@@ -11,7 +11,7 @@ The following language elements are provided to support threads.
## Running Callback Functions as Threads
-A callback function is associated with a particular event via the Event property of the object concerned. A callback function is executed by [`⎕DQ`](../../../language-reference-guide/system-functions/dq/) when the event occurs, or by [`⎕NQ`](../../../language-reference-guide/system-functions/nq/).
+A callback function is associated with a particular event via the Event property of the object concerned. A callback function is executed by [`⎕DQ`](../../../language-reference-guide/system-functions/dq/) when the event occurs, or by [`⎕NQ`](../../../language-reference-guide/system-functions/nq-monadic/).
If you append the character `&` to the name of the callback function in the `Event` specification, the callback function will be executed asynchronously as a thread when the event occurs. If not, it is executed synchronously as before.
diff --git a/shared-code-files-user-guide/docs/worked-example.md b/shared-code-files-user-guide/docs/worked-example.md
index d563b9b0176..8cb3df1f5f6 100644
--- a/shared-code-files-user-guide/docs/worked-example.md
+++ b/shared-code-files-user-guide/docs/worked-example.md
@@ -91,7 +91,7 @@ X
_fk
```
-Finally, verify that the result of [`⎕NL`](../../language-reference-guide/system-functions/nl) and the names exposed by the shared code file are identical (the only difference should be the three names defined since the [`)CLEAR`](../../language-reference-guide/system-commands/clear) operation):
+Finally, verify that the result of [`⎕NL`](../../language-reference-guide/system-functions/nl-monadic) and the names exposed by the shared code file are identical (the only difference should be the three names defined since the [`)CLEAR`](../../language-reference-guide/system-commands/clear) operation):
```apl
(⎕NL ⍳10)≡1 listDWX ⍳10
0
diff --git a/unix-installation-and-configuration-guide/docs/quadna.md b/unix-installation-and-configuration-guide/docs/quadna.md
index c1c9ebcd9f0..13c50b2fa76 100644
--- a/unix-installation-and-configuration-guide/docs/quadna.md
+++ b/unix-installation-and-configuration-guide/docs/quadna.md
@@ -2,7 +2,7 @@
`⎕NA` is fully supported under all supported non-Windows platforms; the Conga communications package for example is a shared library on all platforms.
-`⎕NA` supports user-written shared libraries and system-supplied shared libraries. Under non-windows platforms, Dyalog is supplied with a shared library, **dyalog32** or **dyalog64**, that contains the same functions as **dyalog32.dll** and **dyalog64.dll** (as described in [`⎕NA`: The Dyalog DLL](../../language-reference-guide/system-functions/na#the-dyalog-dll)); the file extension of the shared library is operating-system dependent. The function `getlasterror` is also included – this returns the error code at the point when the called function failed, which can be different from its value at the point when a previous error occurred).
+`⎕NA` supports user-written shared libraries and system-supplied shared libraries. Under non-windows platforms, Dyalog is supplied with a shared library, **dyalog32** or **dyalog64**, that contains the same functions as **dyalog32.dll** and **dyalog64.dll** (as described in [`⎕NA`: The Dyalog DLL](../../language-reference-guide/system-functions/na-dyadic#the-dyalog-dll)); the file extension of the shared library is operating-system dependent. The function `getlasterror` is also included – this returns the error code at the point when the called function failed, which can be different from its value at the point when a previous error occurred).
It is necessary to specify the complete name of the file containing the shared library, no extension is added by Dyalog APL.
diff --git a/windows-installation-and-configuration-guide/docs/configuration-parameters/pfkey-size.md b/windows-installation-and-configuration-guide/docs/configuration-parameters/pfkey-size.md
index dceaef136d3..6cb2d037731 100644
--- a/windows-installation-and-configuration-guide/docs/configuration-parameters/pfkey-size.md
+++ b/windows-installation-and-configuration-guide/docs/configuration-parameters/pfkey-size.md
@@ -1,6 +1,6 @@
# PFKey_Size
-This parameter specifies the size of the buffer that is used to store programmable function key definitions. See [Program Function Key ](../../../language-reference-guide/system-functions/pfkey).
+This parameter specifies the size of the buffer that is used to store programmable function key definitions. See [Program Function Key ](../../../language-reference-guide/system-functions/pfkey-dyadic).
For further details about defining a valid value for this parameter, see [Specifying Size-related Parameters](./configuration-parameters.md).