-
Notifications
You must be signed in to change notification settings - Fork 10
API
NOTE: This is the documentation for Link 2.0, which is distrubuted with Dyalog APL versions 17.1 and 18.0. If you are looking for documentation for Link version 3.0 it is available separately. If you are using version 18.0 and just getting started with Link, installing version 3.0 is highly recommended.
The Link API functions are normally found in ⎕SE.Link
. All API functions take a character
vector or a nested vector as a right argument, and optionally a namespace containing option values on
the left. For more details on setting options, look below the following table:
Function | Right Argument(s) | Options | Result |
---|---|---|---|
Add]
|
items | filename all | |
Break]
|
namespace | ||
CaseCode | filename | case-coded filename | |
Create]
|
namespace directory | source watch [and many more] | |
Export]
|
namespace directory | ||
Expunge]
|
items | ||
Fix | source | namespace name oldname⍺
|
|
GetFileName]
|
item | ||
GetItemName]
|
filename | itemname | |
Import]
|
namespace directory | ||
List]
|
[namespace] | extended | |
Notify | event filename oldfilename | ||
Refresh]
|
namespace | ||
StripCaseCode | filename | filename without case code |
]
These functions have user command covers.
⍺
The left argument to Fix is a 3-element vector, not an option namespace.
API functions take a primary argument on the right which is a simple
character vector or a nested vector as documented above. With the exception of Fix,
which takes a 3-element left argument, API functions typically accept an option namespace as
the left argument. For example, to create a link with non-default source
and flatten
options,
you would write:
options←⎕NS '' ⍝ create empty namespace
options.(source flatten)←'dir' 1 ⍝ set two named options
options ⎕SE.Link.Create 'myapp' '/sources/myapp' ⍝ namespace and director name on the right, options on left
Most, but not all, API functions have a corresponding user command, to make them a little easier to use
interactively. The API functions with user command covers are indicated with ]
in the above table. These user commands all take exactly the same arguments and options as the API functions,
specified using user command syntax. The Link.Create call above would thus be written:
]LINK.Create myapp /sources/myapp -source=dir -flatten
Specifying extensions: Two options require arrays identifying file extensions: codeExtensions
and typeExtensions
.
For convenience, the ]Link.Create
user command accepts the name of a variable containing the array,
rather than the array values. However, in this case,
it is highly recommended to use the API function directly rather than the user command.
Quick links: Introduction Installation Wiki home Email us