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.

Examples<br />

The following table describes some OCONV masked decimal conversion codes and<br />

their results.<br />

The following statement is taken from the sample program in Appendix A, “Sample<br />

Program,” in Developing <strong>UniBasic</strong> Applications. It converts the price stored in<br />

internal format in the ORDERS file for display, including two decimal places,<br />

commas separating thousands of dollars, preceded by a dollar sign.<br />

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

PRICE = OCONV(ORDER.REC,"MD2$,")<br />

Related Command<br />

<strong>UniBasic</strong><br />

Input Code Result<br />

12.339 MD3 0.012<br />

12.339 MD32 0.123<br />

1234 MD2,$ $12.34<br />

-1234 MD2$,- <br />

912391 MD2$,D $9,123.91DB<br />

456789 MD2$,11* $**4,567.89<br />

123.456 MD24P 123.46<br />

11111112339 MD12[@,*,,%] @111*111*123.4%<br />

OCONV Masked Decimal (MD) Examples<br />

ICONV Masked Decimal (MD)

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

Saved successfully!

Ooh no, something went wrong!