
Section 7. Installation
238
7.8.13.1 String Operators
The table
String Operators
(p. 238)
list and describes available string operators.
String operators are case sensitive.
Table 38.
String Operators
Operator Description
&
Concatenates strings. Forces numeric values to strings before
concatenation.
Example
1 & 2 & 3 & "a" & 5 & 6 & 7 = "123a567"
+
Adds numeric values until a string is encountered. When a string is
encountered, it is appended to the sum of the numeric values. Subsequent
numeric values are appended as strings.
Example:
1 + 2 + 3 + "a" + 5 + 6 + 7 = "6a567"
-
"Subtracts" NULL ("") from the end of ASCII characters for conversion to
an ASCII code (LONG data type).
Example:
"a" - "" = 97
ASCII codes of the first characters in each string are compared. If the
difference between the codes is zero, codes for the next characters are
compared. When unequal codes or NULL are encountered (NULL
terminates all strings), the difference between the last compared ASCII
codes is returned.
Examples:
Note
— ASCII code for a = 97, b = 98, c = 99, d = 100, e = 101, and all
strings end with NULL.
Difference between
NULL
and
NULL
"abc" - "abc" = 0
Difference between
e
and
c
"abe" - "abc" = 2
Difference between
c
and
b
"ace" - "abe" = 1
Difference between
d
and
NULL
"abcd" - "abc" = 100
<
,
>
,
<>
,
<=
,
>=
,
=
ASCII codes of the first characters in each string are compared. If the
difference between the codes is zero, codes for the next characters are
compared. When unequal codes or NULL are encountered (NULL
terminates all strings), the requested comparison is made. If the comparison
is true, -1 or True is returned. If false, 0 or False is returned.
Examples:
Expression
Result
x = "abc" = "abc"
x = -1 or True
x = "abe" = "abc"
x = 0 or False
x = "ace" > "abe"
x = -1 or True
Summary of Contents for CR850
Page 2: ......
Page 4: ......
Page 6: ......
Page 26: ...Table of Contents 26...
Page 30: ...Section 2 Cautionary Statements 30...
Page 32: ...Section 3 Initial Inspection 32...
Page 35: ...Section 4 Quickstart Tutorial 35 Figure 2 Wiring panel...
Page 55: ...Section 4 Quickstart Tutorial 55 Figure 24 PC200W View data utility...
Page 78: ...Section 5 System Overview 78...
Page 80: ...Section 6 CR800 Specifications 80...
Page 267: ...Section 7 Installation 267 Figure 84 Running average signal attenuation...
Page 268: ...Section 7 Installation 268...
Page 384: ...Section 8 Operation 384 Figure 113 Using the keyboard display...
Page 387: ...Section 8 Operation 387 Figure 116 Real time custom...
Page 388: ...Section 8 Operation 388 8 8 1 3 Final Storage Tables Figure 117 Final storage tables...
Page 389: ...Section 8 Operation 389 8 8 2 Run Stop Program Figure 118 Run Stop Program...
Page 390: ...Section 8 Operation 390 8 8 3 File Display Figure 119 File display...
Page 396: ...Section 8 Operation 396...
Page 402: ...Section 9 Maintenance 402...
Page 450: ...Section 11 Glossary 450...
Page 504: ...Appendix A CRBasic Programming Instructions 504...
Page 526: ...Appendix B Status Table and Settings 526...
Page 530: ...Appendix C Serial Port Pinouts 530...
Page 536: ...Appendix E FP2 Data Format 536...
Page 550: ...Appendix F Other Campbell Scientific Products 550...
Page 565: ......