Campbell Scientific CR1000 Measurement and Control System User Manual

Page 504

Advertising
background image

Appendix A. CRBasic Programming Instructions

504 

 

 

HexToDec 
Converts a hexadecimal string to a float or integer. 

Syntax 

Variable = HexToDec(Expression)

InStr 
Finds the location of a string within a string. 

Syntax 

Variable = InStr(Start, SearchString, FilterString,

SearchOption)

LTrim 
Returns a copy of a string with no leading spaces. 

Syntax 

variable = LTrim(TrimString)

Left 
Returns a substring that is a defined number of characters from the left side of 
the original string. 

Syntax 

variable = Left(SearchString, NumChars)

Len 
Returns the number of bytes in a string. 

Syntax 

Variable = Len(StringVar)

LowerCase 
Converts a string to all lowercase characters. 

Syntax 

String = LowerCase(SourceString)

Mid 
Returns a substring that is within a string. 

Syntax 

String = Mid(SearchString, Start, Length)

Replace 
Searches a string for a substring and replaces that substring with a different 
string. 

Syntax 

variable = Replace(SearchString, SubString, ReplaceString)

Right 
Returns a substring that is a defined number of characters from the right side of 
the original string. 

Syntax 

variable = Right(SearchString, NumChars)

RTrim 
Returns a copy of a string with no trailing spaces. 

Syntax 

variable = RTrim(TrimString)

Advertising