11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

OCONV Hex (MX | HEX), Octal (MO), Binary<br />

(MB)<br />

Syntax<br />

OCONV(str.expr, ["HEX | MX [0C] | MO [0C] | MB [0C]"])<br />

Description<br />

The OCONV hex (MX), octal (MO), and binary (MB) functions convert from<br />

decimal or ASCII characters into other numbering systems. If the input value or<br />

conversion code is invalid, UniData returns the input value.<br />

Note: In BASICTYPE P, OCONV returns an empty string if UDT.OPTIONS 56 is on<br />

and the input value or conversion code is invalid.<br />

Parameters<br />

The following table describes each parameter of the syntax.<br />

Parameter Description<br />

str.exp Specifies the number to convert to an alternate numbering system.<br />

HEX |<br />

MX [0C]<br />

Indicates conversion to hexadecimal (base 16). The optional 0C converts<br />

from ASCII character rather than decimal value. HEX is equivalent to<br />

MX0C.<br />

MO [0C] Indicates conversion to octal (base 8). The optional 0C converts from ASCII<br />

character rather than decimal value.<br />

MB [0C] Indicates conversion to binary (base 2). The optional 0C converts from<br />

ASCII character rather than decimal value.<br />

OCONV Numbering System Conversion Parameters<br />

OCONV Hex (MX | HEX), Octal (MO), Binary (MB) 1-514

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!