skip to main content

Library Routines : ASCII2OCTAL

ASCII2OCTAL
The ASCII2OCTAL library routine converts a string to an octal number according to the ASCII table.
Syntax:
 CALL "ASCII2OCTAL" USING asciiValue 
Parameters:
Notes:
The routine always converts both characters in asciiValue. To convert a single character make sure that the first byte contains 0x00. If asciiValue contains spaces, their value 0x20 will be converted to octal.
MOVE X"00" TO asciiValue(1:1)
MOVE "A" TO asciiValue(2:1)
CALL "ASCII2OCTAL" USING asciiValue, octalValue | Returns 101
Examples:
Example - Convert "AZ" state code to its representation in OCTAL
move "AZ" to asciiValue
call "ascii2octal" using asciiValue 

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left