A.7.2 string commands – Campbell Scientific CR1000 Measurement and Control System User Manual
Page 503

Appendix A. CRBasic Programming Instructions
503
String Output Processing
The Sample() instruction will convert data types if the source data type
is different than the Sample() data type. Strings are disallowed in all
output processing instructions except Sample().
A.7.2 String Commands
ArrayLength
Returns the length of a variable array.
Syntax
ArrayLength(Variable)
ASCII
Returns the ASCII / ANSI code of a character in a string.
Syntax
Variable = ASCII(ASCIIString(1,1,X))
CheckSum
Returns a checksum signature for the characters in a string.
Syntax
Variable = CheckSum(ChkSumString, ChkSumType, ChkSumSize)
CHR
Inserts an ANSI character into a string.
Syntax
CHR(Code)
FormatFloat
Converts a floating‐point value into a string. Replaced by SPrintF().
Syntax
String = FormatFloat(Float, FormatString)
FormatLong
Converts a LONG value into a string. Replaced by SPrintF().
Syntax
String = FormatLong(Long, FormatString)
FormatLongLong
Converts a 64‐bit LONG integer into a decimal value in the format of a string
variable.
Syntax
FormatLongLong(LongLongVar(1))
HEX
Returns a hexadecimal string representation of an expression.
Syntax
Variable = HEX(Expression)