PickBASIC / FlashBASIC

oconv() function

.md

The oconv() function converts a value from its internal format to its external equivalent, according to the processing code being applied.

Try OCONV codes live in the Conversion Lab: dates, money, time, hex.

Syntax

oconv(str.exp, conv.exp)

Parameter(s)

str.exp String to convert from its internal format to its external equivalent.
conv.exp Processing code used in the conversion.

Example(s)

This example converts check.amount to external format, using the "mr2" conversion.

check.amount = 1250
print oconv(check.amount,"mr2")   ;* 12.50

This example converts check.date to external format, using the "d" conversion.

check.date = 12477
print oconv(check.date,"d")   ;* 27 FEB 2002

Common output masks: money, date, and case

print oconv(123456, "mr2,$")   ;* $1,234.56
print oconv(1, "d4/")          ;* 01/01/1968
print oconv("john", "mcu")     ;* JOHN

See also

Referenced by