Topic: APLX Help : Help on APL language : System Functions & Variables : ⎕TR Translate text to/from External
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

⎕TR Translate Text to/from External


The dyadic system function ⎕TR translates character data from internal (⎕AV) representation to the external representation used in non-APL applications, and vice versa. Normally, this translation is done automatically when text data is transferred to/from APL, but sometimes you may need to translate data explicitly.

The right argument is a character array of any size and shape. The left argument is an integer code indicating in which direction you wish to translate. This is 1 for External (Extended ASCII) to Internal, and ¯1 for Internal to External. The result is a character array of the same size and shape as the right argument, with the characters translated as requested.

      ⎕AF 'hello'
232 229 236 236 239
      ⎕AF ¯1 ⎕TR 'hello'
104 101 108 108 111

Topic: APLX Help : Help on APL language : System Functions & Variables : ⎕TR Translate text to/from External
[ Previous | Next | Contents | Index | APL Home ]