ASCR5

Convert ASCII characters into RAD50 characters

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall ASCR5(ascii, rad50)

Arguments

ascii

A literal or variable that contains three ASCII characters to be converted. (a)

rad50

The variable that will be loaded with two RAD50 characters, left-justified over blanks. (a)

Discussion

The ASCR5 routine converts three ASCII characters into two RAD50 characters. (RAD50 was a compression technique used on PDP-11 systems.) ASCR5 complements the R5ASC routine.

ASCII-to-RAD50 conversions are valid for the following ASCII characters:

If the ASCII string contains any other characters, it is still converted, but it yields a RAD50 value that cannot be converted back correctly with the R5ASC external subroutine.

If the size of the ASCII value is less than three characters, an “Argument specified with wrong size” error ($ERR_ARGSIZ) is generated. If the size is more than three characters, only the leftmost three characters are converted. If the size of the rad50 variable is less than two characters, an “Argument specified with wrong size” error is also generated.

See also

R5ASC routine

Examples

record
    asc         ,a3
    rad         ,a2
proc
    xcall ascr5("ABCDE", rad)           ;Converts "ABC"
    asc = "1A2"
    xcall ascr5(asc, rad)               ;Converts "1A2"
    stop
end