UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
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
- Page 324 and 325: Return Code Status 1-286 UniBasic C
- Page 326 and 327: GET Syntax GET[X] var[,length] [SET
- Page 328 and 329: Example In the following example, t
- Page 330 and 331: Parameters The following table desc
- Page 332 and 333: getHTTPDefault Syntax getHTTPDefaul
- Page 334 and 335: GETLIST Syntax GETLIST list.name [,
- Page 336 and 337: UniData SQL SELECT - For informatio
- Page 338 and 339: STATUS Function Return Values After
- Page 340 and 341: GETQUEUE Syntax GETQUEUE() Descript
- Page 342 and 343: GETREADU Syntax GETREADU() Descript
- Page 344 and 345: getResponseHeader Syntax getRespons
- Page 346 and 347: The following table describes each
- Page 348 and 349: Parameters The following table desc
- Page 350 and 351: GETUSERGROUP Syntax GETUSERGROUP(ui
- Page 352 and 353: GETUSERNAME Syntax GETUSERNAME(uid)
- Page 354 and 355: 1-316 UniBasic Commands Reference
- Page 356 and 357: Related Commands UniBasic GOSUB, ON
- Page 358 and 359: Examples In the following example,
- Page 360 and 361: Parameter Description The replace.n
- Page 362 and 363: This next example compiles and runs
- Page 364 and 365: Related Command UniBasic GTS 1-326
- Page 366 and 367: HASH Syntax HASH(rec.key,modulo,typ
- Page 368 and 369: Parameters The following table desc
- Page 370 and 371: HUSH Syntax HUSH {ON | OFF | expr}
- Page 372 and 373: ICONV Syntax ICONV(expr,conv.code.e
- Page 376 and 377: 1-337 UniBasic Commands Reference
- Page 378 and 379: The following table describes vario
- Page 380 and 381: Related Command UniBasic OCONV Grou
- Page 382 and 383: Example In the following example, t
- Page 384 and 385: Parameters Description Example You
- Page 386 and 387: Parameter Description Examples In t
- Page 388 and 389: Parameter Description Example In th
- Page 390 and 391: ICONV Packed Decimal (MP1) Syntax I
- Page 392 and 393: Parameter Description Example In th
- Page 394 and 395: Example The following table describ
- Page 396 and 397: The following table lists conversio
- Page 398 and 399: ICONV Pattern Match (P) Syntax ICON
- Page 400 and 401: Example In the following example, t
- Page 402 and 403: ICONV Text Extraction (T) Syntax IC
- Page 404 and 405: ICONV File Translation (Tfile) Synt
- Page 406 and 407: STATUS Function Return Values After
- Page 408 and 409: 1-369 UniBasic Commands Reference
- Page 410 and 411: INDEX Syntax INDEX(str.expr1,str.ex
- Page 412 and 413: INDICES Syntax INDICES(file.var[, i
- Page 414 and 415: initSecureServerSocket function Syn
- Page 416 and 417: initServerSocket Syntax initServerS
- Page 418 and 419: INMAT Syntax INMAT( ) INMAT(array.n
- Page 420 and 421: Related Commands UniBasic DIM, MAT,
- Page 422 and 423: Warning: Processing differs when yo
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