System Function DR
From NARS2000
Monadic Function
|
||||
R is an arbitrary array. | ||||
Z is a numeric scalar which represents the datatype of R. |
The datatypes are encoded with a unique index in the low-order two digits, and the bits per element in the remaining digits:
- Boolean: 100, one bit per element
- Character: 1601, 16 bits per element
- Integer: 6402, 64 bits per element
- Floating Point: 6403, 64 bits per element (double precision)
- Arithmetic Progression Array: 6404 64 bits each for the offset and multiplier
- Heterogeneous: 3208, 32 bits per element (each is a pointer)
- Nested: 3210, 32 bits per element (each is a pointer)
For example,
⎕DR 2 100⍴1
100
⎕dr ⌈/⍬
6403
Dyadic Function
|
||||
R is an arbitrary array. | ||||
L is an integer scalar datatype (see the table above). | ||||
Z is R where each of the values are converted to the datatype indicated by L. |
For example,
1601 ⎕dr 65 49
A1