## ŒOV Overlay

The dyadic system function ŒOV allows several variables, functions and operators to be grouped together to form a single item (known as an overlay) within the workspace. The overlay can then be stored, and later unpacked and dispersed. An overlay in a workspace behaves like an empty vector, but occupies the space taken up by its members. Overlays are mostly used in conjunction with files, where it is useful to be able to store a number of APLX variables, functions, and operators (including locked objects) as one file component.

An overlay is created by a statement of this form:

                 OV„0 ŒOV  NAMETABLE

where NAMETABLE is a character matrix of the names of the variables, functions, and operators to be placed in the overlay, or a character vector if only one item is to to be placed in the overlay,.

The contents of the overlay are dispersed by statements of this form:

                 1 ŒOV OV
                 2 ŒOV OV

OV is an overlay. The left argument 1 specifies that the overlay should be dispersed with functions and operators locked. The left argument 2 specifies that unlocked functions and operators should be left unlocked. Both return a matrix of the names of the objects dispersed.

A statement of this form:

                 3 ŒOV OV

returns a character matrix of the names of the items in the overlay.

                 (0 ŒOV ŒNL 2 3)Õ1 1         (Write all functions and variables to
                                              file 1 component 1)
                 VAR„0 ŒOV ŒBOX 'BILL JOE'   (Make up an overlay)
                 ½VAR                        (Looks like an empty vector)
           0
                 3 ŒOV VAR                   (What is in the overlay)
           BILL
           JOE

Notes: The maximum total size of the objects in an overlay is 16MB. This is to ensure compatibility with previous APL.68000 releases. Classes and class members cannot currently be placed in an overlay.

### Overlays in APLX64

Overlays are implemented in 64-bit versions of APLX; the format of the overlay is unchanged from the 32-bit version. They can therefore be used for exchanging data in both directions with 32-bit implementations of APLX.

In order to retain this compatibility, functions and variables placed in overlays using ŒOV are converted to 32-bit form. This means that arrays containing 64-bit integers will be converted to floating-point if they cannot be represented as 32-bit integers. Loss of precision will occur for any integers of magnitude bigger than 2*53.

Topic: APLX Help : Help on APL language : System Functions & Variables : ŒOV Overlay

[ Previous | Next | Contents | Index ]