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 Masked Decimal (MD)<br />

Syntax<br />

OCONV(num.expr, "MDn [f] [ [ [prefix], [thsnd_mark], [dec_symbl], [suffix] ] ]<br />

[,] [$] [- | < | E | C | D] [P] [Z] [T] [xc]")<br />

Description<br />

The OCONV masked decimal (MD) function scales, rounds, and formats a number<br />

for display with up to nine decimal places. num.expr can be any numeric value. If the<br />

input value or 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 the conversion code is invalid.<br />

Parameters<br />

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

Some parameters set the same values. Results are unpredictable if you make<br />

conflicting assignments.<br />

Parameter Description<br />

1-501 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

num.expr Indicates a number to be formatted.<br />

n Sets precision (the number of decimal places represented). It can be a<br />

number between 0 and 9. If n is less than the number of decimal points in the<br />

input data, the resulting value is rounded.<br />

f Scales the input value num.expr by moving the decimal point f places to the<br />

left. If omitted, f defaults to the value assigned to n (for example, if you<br />

specify MD2, UniData reads it as MD22).<br />

OCONV Masked Decimal (MD) Parameters

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

Saved successfully!

Ooh no, something went wrong!