BINARY [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation
MPE/iX Intrinsics Reference Manual
BINARY
NM and CM callable.
Converts a numeric (octal or decimal) ASCII string to a 16-bit twos
complement binary value.
Syntax
_______________________________________
| |
| I16 CA I16V |
| bineqv:=BINARY(asciieqv,length);|
_______________________________________
Functional Return
bineqv 16-bit signed integer (assigned functional return)
Passes the twos complement binary equivalent of the
numeric string.
Parameters
asciieqv character array (required)
Passes the octal or signed-decimal number (in ASCII
characters) to be converted. If the character
string begins with a percent sign (%), it is
treated as an octal value. If the character string
begins with a dollar sign ($), it is treated as a
hexadecimal value. In this case, the string must
be less than 6 characters and only 0 through 9, a
through f, and A through F are allowed. If the
character string begins with a plus sign, a minus
sign, or a number, it is treated as a decimal
value. Leading blanks are not allowed and are
treated as illegal characters.
length 16-bit signed integer by value (required)
Passes the length (number of bytes) of the
ASCII-coded value. If the value of length is 0,
the intrinsic returns 0 to the calling process.
When the value of length is negative, the intrinsic
causes the process to abort.
Condition Codes
CCE (2) Request granted. A 16-bit binary value is returned
to the process.
CCG (0) Request denied. A word overflow, possibly
resulting from too many characters (asciieqv number
too large), occurred in the value returned.
CCL (1) Request denied. An illegal character was
encountered in asciieqv. For example, the digits 8
or 9 were specified in an octal value.
Related Information
Intrinsics DBINARY
Commands None
Manuals Data Types Conversion Programmer's Guide
(32650-90015)
MPE/iX 5.0 Documentation