Advanced Language Features

 

APL Standard and More

Dyalog strictly adheres to the ISO8485 standard for the APL language but provides many additional features and extensions such as modified assignment, function assignment, choose and reach indexing, function composition, the commute operator, and of course namespace technology.

Namespaces
Dynamic Functions
Multi-Threading

Nested Array APL

Dyalog was designed right from scratch as a nested array APL and operations on nested arrays are highly efficient. Nested arrays and operations on nested arrays follow IBM APL2 conventions.


APL2 Compatibility

Dyalog provides close compatibility with IBM APL2 and includes enlist, find, selective specification, defined operators, enclose with axes, take and drop with axes, and ravel with axes. Strand assignment is supported with or without parentheses.

Dyalog Limited has a stated policy to increase compatibility with APL2 as part of its ongoing product development. Potential conflicts between original Dyalog and APL2 conventions are resolved using a system variable *ML (migration level) that can be localised. To obtain the greatest available degree of compatibility with APL2, you simply set the default value of *ML to its maximum value.


Namespaces

Namespaces allow you to partition your workspace into self-contained subsystems.

Namespaces also provide the foundation for Object Oriented (OO) technology in Dyalog, and act as the basis for interfaces to other Windows OO technologies including .NET, COM and the Windows Graphical Interface (GUI). Read pdf

Back to top


Control Structures

Dyalog includes APL.2000 compatible Control Structures which provide a means to control the flow of execution in your APL programs.

A control structure is a block of lines in an APL function that begins on a statement starting with a control word such as :If , or :While , and finishes on a : End statement. The flow of control within a control structure is determined by other keywords such as :Else , :ElseIf , :Until and so forth.


Dynamic Functions

A dynamic function (operator) is an alternative function definition style suitable for defining small to medium sized functions. Dynamic functions provide an elegant and more concise alternative to traditional defined functions, and can offer performance benefits too.

Dynamic functions deliver true functional programming in APL. Read pdf

Back to top


Multi-Threading

Dyalog supports multi-threading - the ability to run more than one APL expression at the same time.

This unique capability allows you to perform background processing, such as printing, database retrieval, database update, calculations, and so forth while at the same time perform other interactive tasks.

Multi-threading may be used to improve throughput, improve responsiveness and is an important ingredient in any server application that has to deal with multiple clients. Read pdf

Back to top


Error Trapping

Error trapping is provided by the system variable *TRAP and by the :Trap control structure.

*TRAP is a nested vector whose items specify the action to be taken when a particular error, or set of errors, occurs. *TRAP can be set so that when an error occurs the system executes a particular expression and you can specify whether or not the state indictor is first to be cut back to a particular function in the stack. Along with other tools that include *DM, *SI, *SIGNAL, *STACK and *STATE, *TRAP provides the mechanism to make an application truly professional.


Function Time Stamps

When you fix a function, Dyalog records the time stamp and the user who fixed it. This information is made available through the system function *AT which closely emulates the APL2 implementation. The information is also displayed by the Workspace Explorer.


Other Features

The system function *OR , which is unique to Dyalog, provides an extremely fast mechanism to convert functions into arrays that can be stored on component files. Such arrays can be converted back into functions using *FX.

*OR on a function is fast because its result is internally almost identical to the body of the function named in its argument; only a single bit has been changed. Converting a *OR object back into a function using *FX is almost equally fast. The use of *OR is much faster than using *CR, *VR or *NR and is the ideal tool for implementing function overlays.

Dyalog includes the system function *SHADOW which is used to dynamically shadow names, just as if they had been included in the function header line.

The system variable *DIV defines how division by 0 is to be treated; if *DIV is set to 1, division by zero yields 0 rather than an error.

The system function *REFS returns all of the names referenced by a defined function or operator.

Not only is there an industry standard *FMT , but *FMT can be used monadically to convert any array into its character display form.

These are just some of the additional language features that help to make your job easier and makes Dyalog a pleasure to use.

 

 

Dyalog Image