UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
The following table lists conversion codes to be used with ICONV to convert from other numbering systems to decimal value or ASCII character. ICONV conversions into other numbering systems produce multiple characters in the target numbering system: 1-357 UniBasic Commands Reference Hexadecimal – One ASCII character produces two hexadecimal characters. For example, ASCII character “0” is equal to hexadecimal “30”. Octal – One ASCII character produces three octal characters. For example, ASCII character “0” is equal to octal “060”. Binary – One ASCII character produces eight binary characters. For example, ASCII character “0” is equal to octal “00110000”. Examples From To Function Binary Decimal value ICONV MB Binary ASCII character ICONV MB0C Octal Decimal value ICONV MO Octal ASCII character ICONV MO0C Hexadecimal Decimal value ICONV MX Hexadecimal ASCII character ICONV MX0C ICONV HEX ICONV Options for Converting from Alternate Numbering Systems The following table demonstrates some ICONV MO, MX, and MB conversion codes and their results. Input Code Result 123123 MO 42579 (decimal) 123123 (octal) MO0C SS (ASCII characters) Examples of Numbering System Conversions
Related Commands UniBasic Input Code Result 100 (hexadecimal) MX 256 (decimal) 101010101010 (binary) MB 170 (decimal) 4B (hexadecimal) MX 75 (ASCII characters) Examples of Numbering System Conversions (continued) CHAR; OCONV Hex (MX | HEX), Octal (MO), Binary (MB); SEQ ICONV Hex (MX | HEX), Octal (MO), Binary (MB) 1-358
- 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 374 and 375: STATUS Function Return Values After
- 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 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
- Page 424 and 425: In the next example, the INPUT stat
- Page 426 and 427: Parameter Description 1-387 UniBasi
- Page 428 and 429: Related Commands UniBasic CLEARINPU
- Page 430 and 431: INPUTERR Syntax INPUTERR error.expr
- Page 432 and 433: INPUTIF Syntax INPUTIF var [THEN st
- Page 434 and 435: INPUTTRAP Syntax INPUTTRAP string.e
- Page 436 and 437: INS Syntax INS expr BEFORE dyn.arra
- Page 438 and 439: INSERT Syntax INSERT(dyn.array.expr
- Page 440 and 441: INT Syntax INT(num.expr) Descriptio
- Page 442 and 443: ISNV Syntax ISNV(expr) Description
- Page 444 and 445: ISNVS Syntax ISNVS(dynamic.array) D
The following table lists conversion codes to be used with ICONV to convert from<br />
other numbering systems to decimal value or ASCII character.<br />
ICONV conversions into other numbering systems produce multiple characters in the<br />
target numbering system:<br />
1-357 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />
Hexadecimal – One ASCII character produces two hexadecimal characters.<br />
For example, ASCII character “0” is equal to hexadecimal “30”.<br />
Octal – One ASCII character produces three octal characters. For example,<br />
ASCII character “0” is equal to octal “060”.<br />
Binary – One ASCII character produces eight binary characters. For<br />
example, ASCII character “0” is equal to octal “00110000”.<br />
Examples<br />
From To Function<br />
Binary Decimal value ICONV MB<br />
Binary ASCII character ICONV MB0C<br />
Octal Decimal value ICONV MO<br />
Octal ASCII character ICONV MO0C<br />
Hexadecimal Decimal value ICONV MX<br />
Hexadecimal ASCII character ICONV MX0C<br />
ICONV HEX<br />
ICONV Options for Converting from Alternate Numbering Systems<br />
The following table demonstrates some ICONV MO, MX, and MB conversion codes<br />
and their results.<br />
Input Code Result<br />
123123 MO 42579 (decimal)<br />
123123 (octal) MO0C SS (ASCII characters)<br />
Examples of Numbering System Conversions