DASCII [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation
MPE/iX Intrinsics Reference Manual
DASCII
NM and CM callable.
Converts a 32-bit binary number to a specified base and represents it as
a numeric ASCII string.
Syntax
_______________________________________________
| |
| I16 I32V I16V CA |
| numchar:=DASCII(binvalue,base,asciieqv);|
_______________________________________________
Functional Return
numchar 16-bit signed integer (assigned functional return)
Returns the number of characters in the resulting
string.
Parameters
binvalue 32-bit signed integer by value (required)
Contains the binary number to be converted to an
ASCII string.
base 16-bit signed integer by value (required)
Contains one of the following translation
identifiers:
Value Meaning
8 Convert to octal (pad with zeros)
10 Convert to decimal (left-justified)
-10 Convert to decimal (right-justified)
16 Convert to hexadecimal (pad with zeros)
If any other number is entered in this parameter,
the intrinsic causes the process to abort.
asciieqv character array (required)
Returns the converted value. Must be long enough
to contain the result (<= 11 characters).
* For octal conversions (base=8), 11
characters (including leading zeros) are
returned; numchar returns the number of
significant (right-justified) characters
(excluding leading zeros). If binvalue=0,
the length returned is 1.
* For decimal conversions (base=10), binvalue
is considered a 32-bit twos complement
integer ranging from -2,147,483,648 to
+2,147,483,647. If binvalue=0, only one
zero character is returned in asciieqv;
numchar returns the total number of
characters (including the sign). For
example, if binvalue=0, the length returned
is 1.
* For hexadecimal conversions (base=16), 8
characters (including leading zeros) are
returned. The digits can be 0..9 and A..F.
Numchar returns the number of significant
(right-justified) characters (excluding
leading zeros). For example, if
binvalue=32, numchar is 2 and asciieqv will
be 00000020.
Related Information
Intrinsics ASCII
Commands None
Manuals Data Types Conversion Programmer's Guide
(32650-90015)
MPE/iX 5.0 Documentation