Specifications

Section 11. String Functions
11-2
11.1.5 String Comparison Operators
The comparison operators =, >,<,<>, >= and <= operate on strings. The
equality operators perform the string subtraction operation noted above and
apply the appropriate rule to return either TRUE or FALSE.
Example
Find the name “Mike” in the array of Names
For ID = 1 to 10
If Names(ID) = “Mike”
….
11.1.6 Sample() Type Conversions and other Output
Processing Instructions
The Sample() instruction will do the necessary conversion if the source data
type is different than the Sample() data type. The conversion of floats and
longs to strings will allocate 12 bytes per field to hold the string.
For all other output processing instructions, except when using a reps of 1, the
source data type must be the same as the data type specified in the instruction.
(Only the first element of the source is converted from Long to Float if
necessary. Therefore, this makes a rep of 1 legal.)
Strings are disallowed in all output processing instructions except Sample().
11.2 String Manipulation Functions
CHR(Code)
Used mainly to express non-printable ASCII characters.
Code ranges from 0..255. Note that 0 will terminate a string and therefore is
useful only if this characters needs to be output.
CHR Example
Add a carriage return, line feed to a string at the end.
X = “Line”+Chr(13)+Chr(10)
FormatFloat (Float, FormatString)
Used to convert a floating point value into a string.
Syntax
String = FormatFloat (Float, FormatString)
Remarks
The string conversion of the floating point value is formatted based on the
FormatString. See the CRBasic Editor help for parameter details.