Topic: APLX Help : Help on APL language : System Functions & Variables : ⎕AF Atomic Function
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

⎕AF Atomic Function


The monadic function ⎕AF is used to convert characters into integers and vice versa. If the right argument is a character array, the result is an integer array of the same shape, with each element being the position in ⎕AV of the corresponding character. If the right argument is an integer array, the result is a character array of the same shape, with each element being the character at the corresponding position in ⎕AV.

Exceptionally for an APL function it is origin independent, always assuming origin 0. It is the same as ⎕AV⍳ or ⎕AV[..] (in origin 0). Integer arguments must be in the range 0 to 255 and the right argument must always be a simple array.

             ⎕AF 'LEVEL II'
       108 101 118 101 108 32 105 105
             ⎕AF 108 101 118 101 108 32 105 105
       LEVEL II

Topic: APLX Help : Help on APL language : System Functions & Variables : ⎕AF Atomic Function
[ Previous | Next | Contents | Index | APL Home ]