-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix indentation, and elaborate a bit on apla * Update Arrays.md
- Loading branch information
Showing
2 changed files
with
20 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
# Array Formats | ||
|
||
By default, Link uses *APL Array Notation (APLAN)* to store arrays in text files. While APLAN is a good format for describing numeric data, nested arrays and many high rank arrays, it is not ideal for storing character data. Link 4.0 introduces experimental support for storing multi-line character data in simple text files. | ||
By default, Link uses *APL Array Notation (APLAN)* to store arrays in text files. While APLAN is a good format for describing numeric data, nested arrays and many high rank arrays, it is not ideal for storing text data. Link 4.0 introduces experimental support for storing multi-line character data in simple text files. | ||
|
||
The configuration setting `noTextFiles` can be used to disable this support: If `noTextFiles` is set to 1, all arrays will be store using APLAN. You can set this option when a link is created, or using [`Link.Configure`](../API/Link.Configure). | ||
The configuration setting `text` can be used to enable this feature: If `text` is set to `'aplan'` (the default) then all arrays will be store using APLAN. If `text` is set to `'plain'` (the default) then text arrays that adhere to a set of very specific criteria will instead be stored in plain text files. You can set this option when a link is created, or using [`Link.Configure`](../API/Link.Configure). | ||
|
||
## File Extensions for Simple Text Files | ||
Text files which are not in APLAN format will have a penultimate "sub-extension" section in the file name which records the format of the original array in the workspace. The below table describes the array file extensions, what the content represents, and the specific criteria for storage in plain text file. | ||
|
||
Text files which are not in APLAN format will have a penultimate section in the file name which records the format of the original array in the workspace: | ||
For all plain text types, the array must be non-empty. | ||
|
||
| File Extension | Array format | | ||
| -------------- | ------------------------------------ | | ||
| .nl.apla | Simple Vector delimited by ⎕UCS 10 | | ||
| .cr.apla | Simple vector delimited by ⎕UCS 13 | | ||
| .vec.apla | Vector of enclosed character vectors | | ||
| .mat.apla | Character matrix | | ||
| .apla |Without one of the above extensions, the file is in APLAN and could represent any APL array.| | ||
| File Extension | Array Characteristics | Prohibited characters (`⎕UCS`) | ||
| -------------- | ------------------------------------------------------ | ------------------------------ | ||
| .CR.apla | Simple vector with each line terminated by `⎕UCS 13` | `10 11 12 133 8232 8233` | ||
| .LF.apla | Simple vector with each line terminated by `⎕UCS 10` | `11 12 13 133 8232 8233` | ||
| .CRLF.apla | Simple vector with each line terminated by `⎕UCS 13 10`| `11 12 133 8232 8233`<sup>*</sup> | ||
| .vec.apla | Vector of simple character vectors (no scalar elements)| `11 12 13 133 8232 8233` | ||
| .mat.apla | Simple character matrix | `10 11 12 13 133 8232 8233` | ||
|
||
<sup>* In addition, every occurring `⎕UCS 10` must be immediately preceded by a `⎕UCS 13` and every occurring `⎕UCS 13` must be immediately followed by `⎕UCS 10`.</sup> | ||
|
||
In all other cases, the extension will be just `.apla` and the file will contain APLAN that can represent any APL array. |