UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
INPUTIF Syntax INPUTIF var [THEN statements] [ELSE statements] Description The UniBasic INPUTIF command retrieves input from the type-ahead buffer and assigns the input to a variable. Parameters The following table describes each parameter of the syntax. Parameter Description Related Commands UniBasic CLEARINPUT, INPUT, INPUT @, PROMPT, SYSTEM 1-393 UniBasic Commands Reference var Specifies the target variable for input data. THEN statements Executes statements if data is available in the type-ahead buffer. ELSE statements Executes statements if data is not available in the type-ahead buffer. INPUTIF Parameters
INPUTNULL Syntax INPUTNULL 'expr' Description The UniBasic INPUTNULL command enables you to change the default INPUTNULL character from the default, underscore, to any other single character. When you enter the INPUTNULL character in response to an INPUT or INPUT @ prompt, UniData stores an empty string in place of the character entered. expr specifies the character to serve as the INPUTNULL character for this session. Note: You must enclose expr in quotation marks. Example In the following example, the pound sign (#) is set as the new INPUTNULL character: PROMPT "" INPUTNULL "#" PRINT @(-1):@(0,10):"Enter a character: " INPUT @(20,10):inpt PRINT "Input is ":inpt PRINT "SEQ = ":SEQ(inpt) PRINT "LEN = ":LEN(inpt) The preceding program segment results in the following output when user input is an underscore character: Enter a character: _ Input is _ SEQ = 95 LEN = 1 INPUTNULL 1-394
- 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
- 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 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
- Page 446 and 447: ITYPE Syntax ITYPE(itype.expr) Desc
- Page 448 and 449: LE Syntax expr1 LE expr2 Synonyms #
- Page 450 and 451: LEN Syntax LEN(str.expr) Descriptio
- Page 452 and 453: LENS Syntax LENS(dyn.array) Descrip
- Page 454 and 455: LISTUSER Syntax LISTUSER() Descript
- Page 456 and 457: LN Syntax LN(num.expr) Description
- Page 458 and 459: The following table describes the s
- Page 460 and 461: Parameters The following table desc
- Page 462 and 463: LOCATE in BASICTYPEs U, P, and M Th
- Page 464 and 465: However, in the following array, th
- Page 466 and 467: Parameters The following table desc
- Page 468 and 469: LOOP/REPEAT Syntax LOOP [statements
- Page 470 and 471: Examples The following example is t
- Page 472 and 473: LOWER Syntax LOWER(dyn.array.expr)
- Page 474 and 475: Related Command UniBasic LTS 1-434
- Page 476 and 477: MAT Syntax MAT dim.array = expr MAT
- Page 478 and 479: the values assigned to FEE1 would b
- Page 480 and 481: Parameter Description Examples In t
INPUTNULL<br />
Syntax<br />
INPUTNULL 'expr'<br />
Description<br />
The <strong>UniBasic</strong> INPUTNULL command enables you to change the default<br />
INPUTNULL character from the default, underscore, to any other single character.<br />
When you enter the INPUTNULL character in response to an INPUT or INPUT @<br />
prompt, UniData stores an empty string in place of the character entered. expr<br />
specifies the character to serve as the INPUTNULL character for this session.<br />
Note: You must enclose expr in quotation marks.<br />
Example<br />
In the following example, the pound sign (#) is set as the new INPUTNULL<br />
character:<br />
PROMPT ""<br />
INPUTNULL "#"<br />
PRINT @(-1):@(0,10):"Enter a character: "<br />
INPUT @(20,10):inpt<br />
PRINT "Input is ":inpt<br />
PRINT "SEQ = ":SEQ(inpt)<br />
PRINT "LEN = ":LEN(inpt)<br />
The preceding program segment results in the following output when user input is an<br />
underscore character:<br />
Enter a character: _<br />
Input is _<br />
SEQ = 95<br />
LEN = 1<br />
INPUTNULL 1-394