UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software

rocketsoftware.com
from rocketsoftware.com More from this publisher
11.04.2013 Views

STATUS Function Return Values After you execute ICONV, the STATUS function returns one of the values described in the following table. Examples The following program segment demonstrates the date and time conversions: 1-335 UniBasic Commands Reference ORDER.REC = ICONV(ORDER_DATE,"D") ORDER.REC = ICONV(ORDER_TIME,"MT") The following program segment is taken from the sample program in Appendix A, “Sample Program,” in Developing UniBasic Applications. It demonstrates the alternate syntax that does not use the ICONV function name. This code right-justifies a string of 10 characters so that the data lines up on the right. PRODUCT_LINE := " ":PRODUCT_NUMBER "R#10" COLOR_LINE := " ":COLOR "R#10" QUANTITY_LINE := " ":QUANTITY "R#10" PRICE_LINE := " ":PRICE "R#10" Related Command UniBasic OCONV Value Description 0 Successful conversion. 1 Invalid input data. 2 Invalid conversion specification. 3 Invalid date for “D” conversion code only. 5 Null value if null value handling is turned on. STATUS Function Return Values

ICONV Date (D) Syntax ICONV(ext.date, "D [y] [c]") Description The ICONV date (D) function converts display representations of dates into simple integer internal format. Internal date format is the number of days before or since December 31, 1967. If the input value or conversion code is invalid, UniData returns the input value. Note: UniData ignores leading and trailing spaces around the input date. In BASICTYPE P, ICONV returns an empty string if UDT.OPTIONS 56 is on and the input value or conversion code is invalid. Parameters The following table describes each parameter of the syntax. Paramete r Description ext.date Specifies the date, in display format, to convert to internal format. Valid delimiters include the slash, comma, hyphen, and period. D Indicates a date conversion. y c The ICONV function does not use y and c, but they are accepted to maintain consistency with the OCONV Date (D) function. ICONV Date Parameters Points to Remember When Entering Dates To avoid unexpected results when you convert dates into internal date format by using ICONV, be aware of the following: ICONV Date (D) 1-336

STATUS Function Return Values<br />

After you execute ICONV, the STATUS function returns one of the values described<br />

in the following table.<br />

Examples<br />

The following program segment demonstrates the date and time conversions:<br />

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

ORDER.REC = ICONV(ORDER_DATE,"D")<br />

ORDER.REC = ICONV(ORDER_TIME,"MT")<br />

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

“Sample Program,” in Developing <strong>UniBasic</strong> Applications. It demonstrates the<br />

alternate syntax that does not use the ICONV function name. This code right-justifies<br />

a string of 10 characters so that the data lines up on the right.<br />

PRODUCT_LINE := " ":PRODUCT_NUMBER "R#10"<br />

COLOR_LINE := " ":COLOR "R#10"<br />

QUANTITY_LINE := " ":QUANTITY "R#10"<br />

PRICE_LINE := " ":PRICE "R#10"<br />

Related Command<br />

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

OCONV<br />

Value Description<br />

0 Successful conversion.<br />

1 Invalid input data.<br />

2 Invalid conversion specification.<br />

3 Invalid date for “D” conversion code only.<br />

5 Null value if null value handling is turned on.<br />

STATUS Function Return Values

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

Saved successfully!

Ooh no, something went wrong!