04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix A. CRBasic Programming Instructions<br />

String Output Processing<br />

The Sample() instruction will convert data types if the source data type<br />

is different than the Sample() data type. Strings are disallowed in all<br />

output processing instructions except Sample().<br />

A.7.2 String Commands<br />

ArrayLength<br />

Returns the length of a variable array.<br />

Syntax<br />

ArrayLength(Variable)<br />

ASCII<br />

Returns the ASCII / ANSI code of a character in a string.<br />

Syntax<br />

Variable = ASCII(ASCIIString(1,1,X))<br />

CheckSum<br />

Returns a checksum signature for the characters in a string.<br />

Syntax<br />

Variable = CheckSum(ChkSumString, ChkSumType, ChkSumSize)<br />

CHR<br />

Inserts an ANSI character into a string.<br />

Syntax<br />

CHR(Code)<br />

FormatFloat<br />

Converts a floating‐point value into a string. Replaced by SPrintF().<br />

Syntax<br />

String = FormatFloat(Float, FormatString)<br />

FormatLong<br />

Converts a LONG value into a string. Replaced by SPrintF().<br />

Syntax<br />

String = FormatLong(Long, FormatString)<br />

FormatLongLong<br />

Converts a 64‐bit LONG integer into a decimal value in the format of a string<br />

variable.<br />

Syntax<br />

FormatLongLong(LongLongVar(1))<br />

HEX<br />

Returns a hexadecimal string representation of an expression.<br />

Syntax<br />

Variable = HEX(Expression)<br />

503

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!