11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

OCONV Left Justify (ML)<br />

Syntax<br />

OCONV(str.expr, "MLn [f] [ [ [prefix], [thsnd_mark], [dec_symbl], [suffix] ] ] [,] [$]<br />

[C] [Z] [(mask)]")<br />

Description<br />

The OCONV left justify (ML) function scales, rounds, and formats a number, or leftjustifies<br />

it in a mask. str.expr can be any valid text or a numeric value with or without<br />

a decimal. If the input value or conversion code is invalid, UniData returns the input<br />

value.<br />

Note: The OCONV ML and MR functions produce the same output. However,<br />

formatting differs slightly in the following way: if a mask is specified that is larger<br />

than the formatted number, UniData left- or right-justifies the number within a<br />

“column” the width of the mask.<br />

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

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

Parameters<br />

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

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

conflicting assignments.<br />

Parameter Description<br />

str.expr Indicates a text string or number to be left-justified and formatted.<br />

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

number from 0 through 9. If n is less than the number of decimal points<br />

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

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

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

you specify ML2, UniData reads it as ML22).<br />

OCONV Left Justify (ML) Parameters<br />

OCONV Left Justify (ML) 1-504

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

Saved successfully!

Ooh no, something went wrong!