UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
C-2 UniBasic Commands Reference Arithmetic Operators The following table describes the arithmetic operators for UniBasic. Operator Action Example Related Function + Unary plus (same as multiplying by +1). - Unary minus (changes to the opposite sign, same as multiplying by -1). VAR = +VAR ABS VAR = -VAR NEG + Addition. X = VAR1 + VAR2 VAR = VAR + 1 - Subtraction. X = VAR1 - VAR2 VAR = VAR - 1 SADD, SUM SSUB * Multiplication. X = VAR1 * VAR2 SMUL / Division. QUANTITY = PRICE/COST SDIV ** or ^ Exponentiation. X = VAR^2 PWR :, CAT Concatenation. X = VAR1:VAR2 += Increments the value of a variable. -= Decrements the value of a variable. LINES += 1 LINES -= 1 Arithmetic Operators
Operator Action Example Related Function *= Multiplies the value to the left of the operator by the value to the right of the operator. /= Divides the value to the left of the operator by the value to the right of the operator. := Concatenates the value to the left of the operator by the value to the right of the operator. VAR1 *= VAR2 VAR1 /= VAR2 VAR1 := VAR2 Arithmetic Operators (continued) Note: You must include the REUSE function to apply arithmetic operations to all elements of a dynamic array. C-3
- Page 1050 and 1051: C:\Program Files\Adobe\FrameMaker8\
- Page 1052 and 1053: C:\Program Files\Adobe\FrameMaker8\
- Page 1054 and 1055: C:\Program Files\Adobe\FrameMaker8\
- Page 1056 and 1057: C:\Program Files\Adobe\FrameMaker8\
- Page 1058 and 1059: C:\Program Files\Adobe\FrameMaker8\
- Page 1060 and 1061: C:\Program Files\Adobe\FrameMaker8\
- Page 1062 and 1063: C:\Program Files\Adobe\FrameMaker8\
- Page 1064 and 1065: C:\Program Files\Adobe\FrameMaker8\
- Page 1066 and 1067: C:\Program Files\Adobe\FrameMaker8\
- Page 1068 and 1069: C:\Program Files\Adobe\FrameMaker8\
- Page 1070 and 1071: C:\Program Files\Adobe\FrameMaker8\
- Page 1072 and 1073: C:\Program Files\Adobe\FrameMaker8\
- Page 1074 and 1075: C:\Program Files\Adobe\FrameMaker8\
- Page 1076 and 1077: C:\Program Files\Adobe\FrameMaker8\
- Page 1078 and 1079: ASCII Character Codes This appendix
- Page 1080 and 1081: A-3 UniBasic Commands Reference ASC
- Page 1082 and 1083: A-5 UniBasic Commands Reference ASC
- Page 1084 and 1085: A-7 UniBasic Commands Reference ASC
- Page 1086 and 1087: A-9 UniBasic Commands Reference ASC
- Page 1088 and 1089: A-11 UniBasic Commands Reference AS
- Page 1090 and 1091: UniBasic@variables This appendix li
- Page 1092 and 1093: B-3 UniBasic Commands Reference @va
- Page 1094 and 1095: @USER0 @USER1 @USER2 @USER3 @USER4
- Page 1096 and 1097: B-7 UniBasic Commands Reference @SY
- Page 1098 and 1099: B-9 UniBasic Commands Reference Uni
- Page 1102 and 1103: C-4 UniBasic Commands Reference Boo
- Page 1104 and 1105: Reserved Words This appendix lists
- Page 1106 and 1107: D-3 UniBasic Commands Reference Res
- Page 1108 and 1109: D-5 UniBasic Commands Reference Res
- Page 1110 and 1111: D-7 UniBasic Commands Reference Res
- Page 1112 and 1113: D-9 UniBasic Commands Reference Res
- Page 1114 and 1115: Commands Affected by BASICTYPEs and
- Page 1116 and 1117: Command or Function E-3 UniBasic Co
- Page 1118 and 1119: Command or Function E-5 UniBasic Co
- Page 1120 and 1121: Command or Function E-7 UniBasic Co
- Page 1122 and 1123: F-2 UniBasic Commands Reference Com
- Page 1124 and 1125: F-4 UniBasic Commands Reference Com
- Page 1126 and 1127: SUBROUTINE (Update Trigger) SUBROUT
- Page 1128 and 1129: F-8 UniBasic Commands Reference Com
C-2 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />
Arithmetic Operators<br />
The following table describes the arithmetic operators for <strong>UniBasic</strong>.<br />
Operator Action Example Related Function<br />
+ Unary plus (same as<br />
multiplying by +1).<br />
- Unary minus<br />
(changes to the<br />
opposite sign, same as<br />
multiplying by<br />
-1).<br />
VAR = +VAR ABS<br />
VAR = -VAR NEG<br />
+ Addition. X = VAR1 + VAR2<br />
VAR = VAR + 1<br />
- Subtraction. X = VAR1 - VAR2<br />
VAR = VAR - 1<br />
SADD, SUM<br />
SSUB<br />
* Multiplication. X = VAR1 * VAR2 SMUL<br />
/ Division. QUANTITY =<br />
PRICE/COST<br />
SDIV<br />
** or ^ Exponentiation. X = VAR^2 PWR<br />
:, CAT Concatenation. X = VAR1:VAR2<br />
+= Increments the value<br />
of a variable.<br />
-= Decrements the value<br />
of a variable.<br />
LINES += 1<br />
LINES -= 1<br />
Arithmetic Operators