Open topic with navigation
Dyadic ⎕DR converts the data type of its argument Y according to the type specification X. See Data Representation (Monadic) for a list of data types but note that 1287 is not a permitted value in X.
X is a single integer value. The bits in the right argument are interpreted as elements of an array of type X. The shape of the resulting new array will typically be changed along the last axis. For example, a character array interpreted as Boolean will have 8 times as many elements along the last axis.
X is a 2-element integer value. Y is any array.
X is either 0 or a data type. If X is 0, Y is converted to data type X. If X is non-zero, the bits in Y are first interpreted as being of type X before being converted to type X. If Y is a scalar it is ravelled. Conversion of Y from one internal data type to another is performed so as to preserve its values without loss of precision.
The result R is a two element nested array comprised of:
bits← 0 1 0 0 1 0 0 0 , 0 1 0 0 1 0 1 1 80 ⎕DR bits HK 83 ⎕DR bits 72 75 163 ⎕DR bits 19272 0 645 ⎕DR 72 75 ┌─────┬───┐ │72 75│1 1│ └─────┴───┘ 163 645 ⎕DR 72 75 ┌─────┬─┐ │19272│1│ └─────┴─┘
X is a 3-element integer value and X[2 3] is 163 82. The bits in the right argument are interpreted as elements of an array of type X. The system then converts them to the character representation of the corresponding 16 bit integers. This case is provided primarily for compatibility with APL*PLUS. For new applications, the use of the [conv] field with ⎕NAPPEND and ⎕NREPLACE is recommended.
Conversion to and from character (data type 82) uses the translate vector given by ⎕NXLATE 0. By default this is the mapping defined by the current output translate table (usually WIN.DOT).