UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
In the next example, the program segment transfers program control to either “CHARGE:” or “CHECK:” based on the value of the variable VAL. If VAL is not 1 or 2, the program executes the statements after the CASE 1 clause. 1-127 UniBasic Commands Reference PRINT "Option number?" ; INPUT VAL BEGIN CASE CASE VAL = 1 GOSUB CHARGE: CASE VAL = 2 GOSUB CHECK: CASE 1 PRINT "Answer 1 or 2 only" END CASE In the following example, the statement is invalid because the evaluation expression appears on the BEGIN CASE line: BEGIN CASE VAR 1 In the next example, the statement is invalid because BEGIN CASE must appear before the first CASE statement: CASE VAL Related Commands UniBasic IF/THEN/ELSE, LOOP/REPEAT
CAT Syntax expr1 CAT expr2 Synonym : Description The UniBasic CAT arithmetic operator concatenates expr1 to expr2. Examples In the following example, the program segment concatenates A to B, and then prints 123456: A = "123" B = "456" C = A CAT B PRINT C The following program segment compiles and runs only with null value handling on. The program concatenates two strings, one ending with the null value, and another beginning with ‘123.’ This produces the string @AM@NULL123@AM456. The called subroutine, print.setup, converts UniData delimiters and the null value to printable characters. (This subroutine is printed in the entry for “CHANGE” on page 133.) PRT.STG = '' Z=123:@AM:456 Y=@AM:@NULL STG = Y CAT Z CALL print.setup(STG,PRT.STG) PRINT PRT.STG CAT 1-128
- Page 74 and 75: STATUS Code Example 1-80 UniBasic C
- Page 76 and 77: Parameters 1-82 UniBasic Commands R
- Page 78 and 79: Parameter Description format 1 - PE
- Page 80 and 81: 1-86 UniBasic Commands Reference Re
- Page 82 and 83: amInitialize Syntax 1-88 UniBasic C
- Page 84 and 85: amReceiveMsg Syntax amReceiveMsg(hS
- Page 86 and 87: amReceiveRequest Syntax amReceiveRe
- Page 88 and 89: amSendMsg Syntax 1-94 UniBasic Comm
- Page 90 and 91: amSendRequest Syntax amSendRequest(
- Page 92 and 93: amSendResponse Syntax amSendRespons
- Page 94 and 95: amTerminate Syntax amTerminate(hSes
- Page 96 and 97: analyzeCertificate Syntax analyzeCe
- Page 98 and 99: AND Syntax expr1 AND expr2 Synonym
- Page 100 and 101: ASIN Syntax ASIN(expr) Description
- Page 102 and 103: Related Command UniData TERM - For
- Page 104 and 105: BITAND Syntax BITAND(num.expr1,num.
- Page 106 and 107: BITOR Syntax BITOR(num.expr1,num.ex
- Page 108 and 109: BPIOCP Syntax BPIOCP Description Th
- Page 110 and 111: BPIOCPN Syntax BPIOCPN Description
- Page 112 and 113: BREAK Syntax BREAK [KEY] {ON | OFF
- Page 114 and 115: BYTELEN Syntax BYTELEN (string) Des
- Page 116 and 117: Example In the following example, t
- Page 118 and 119: Parameters The following table desc
- Page 120 and 121: CALLC Syntax CALLC c.sub.name [(arg
- Page 122 and 123: CASE Syntax BEGIN CASE CASE express
- Page 126 and 127: Related Commands UniBasic CATS, SPL
- Page 128 and 129: CHAIN Syntax CHAIN "str.expr" Descr
- Page 130 and 131: CHANGE Syntax CHANGE(string, old.su
- Page 132 and 133: CHAR Syntax CHAR(expr) Description
- Page 134 and 135: CHARLEN Syntax CHARLEN (string) Des
- Page 136 and 137: CHECKSUM Syntax CHECKSUM(str.expr)
- Page 138 and 139: Related Commands UniBasic COMMON, C
- Page 140 and 141: UniData DELETECOMMON, STACKCOMMON -
- Page 142 and 143: CLEARFILE Syntax CLEARFILE [file.va
- Page 144 and 145: CLEARINPUT Syntax CLEARINPUT Synony
- Page 146 and 147: UniQuery GET.LIST, SELECT, SSELECT
- Page 148 and 149: CLOSE Syntax CLOSE [file.var] [ON E
- Page 150 and 151: CLOSESEQ Syntax CLOSESEQ seq.file.v
- Page 152 and 153: closeSocket Syntax closeSocket(sock
- Page 154 and 155: COL1 Syntax COL1( ) Description The
- Page 156 and 157: COMMON Syntax COMMON [/common.name/
- Page 158 and 159: 1-161 UniBasic Commands Reference
- Page 160 and 161: UniData DELETECOMMON, STACKCOMMON -
- Page 162 and 163: Related Command UniBasic EXIT 1-165
- Page 164 and 165: In the next example, the program se
- Page 166 and 167: In the next example, the program se
- Page 168 and 169: COUNT Syntax COUNT(str.expr1, str.e
- Page 170 and 171: COUNTS Syntax COUNTS(expr,str.expr)
- Page 172 and 173: createCertificate Syntax createCert
In the next example, the program segment transfers program control to either<br />
“CHARGE:” or “CHECK:” based on the value of the variable VAL. If VAL is not 1<br />
or 2, the program executes the statements after the CASE 1 clause.<br />
1-127 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />
PRINT "Option number?" ; INPUT VAL<br />
BEGIN CASE<br />
CASE VAL = 1<br />
GOSUB CHARGE:<br />
CASE VAL = 2<br />
GOSUB CHECK:<br />
CASE 1<br />
PRINT "Answer 1 or 2 only"<br />
END CASE<br />
In the following example, the statement is invalid because the evaluation expression<br />
appears on the BEGIN CASE line:<br />
BEGIN CASE VAR 1<br />
In the next example, the statement is invalid because BEGIN CASE must appear<br />
before the first CASE statement:<br />
CASE VAL<br />
Related <strong>Commands</strong><br />
<strong>UniBasic</strong><br />
IF/THEN/ELSE, LOOP/REPEAT