HPlogo 900 Series HP 3000 Computer Systems: MPE/iX Intrinsics Reference Manual > Chapter 4 Command Definitions

DBINARY

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

NM and CM callable.

Converts a numeric ASCII string to a 32-bit binary value. The numeric ASCII string can be octal, hexadecimal, or decimal.

Syntax

     I32              CA     I16V

   dbineqv:=DBINARY(dasciieqv,length);

Functional Return

dbineqv

32-bit signed integer (assigned functional return)

Returns the converted 32-bit binary value.

Parameters

dasciieqv

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 string begins with a plus sign, 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)

Returns 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.

  • If the value of length is negative, the intrinsic causes the process to abort.

Condition Codes

CCE (2)

Request granted. A 32-bit binary value is returned to the process.

CCG (0)

Request denied. A word overflow, possibly resulting from too many characters (dasciieqv number too large), occurred in the value (dbineqv) returned.

CCL (1)

Request denied. An illegal character was encountered in dasciieqv. For example, the digits 8 or 9 were specified in an octal value.

Related Information

Intrinsics

BINARY

Commands

None

Manuals

Data Types Conversion Programmer's Guide (32650-90015)

Feedback to webmaster