beautypg.com

A.7 string functions, A.7.1 string operations – Campbell Scientific CR1000 Measurement and Control System User Manual

Page 502

background image

Appendix A. CRBasic Programming Instructions

502 

 

 

LevelCrossing 
Processes data into a one‐ or two‐dimensional histogram using a level‐crossing 
counting algorithm. 

Syntax 

LevelCrossing(Source, DataType, DisableVar, NumLevels,

2ndDim, CrossingArray, 2ndArray, Hysteresis, Option)

RainFlow 
Processes data with the Rainflow counting algorithm, essential to estimating 
cumulative damage fatigue to components undergoing stress / strain cycles (see 
Downing S. D., Socie D. F. (1982) Simple Rainflow Counting Algorithms.  
International Journal of Fatigue Volume 4, Issue 1). 

Syntax 

RainFlow(Source, DataType, DisableVar, MeanBins, AmpBins,

Lowlimit, Highlimit, MinAmp, Form)

A.7 String Functions

Read More! See String Operations

(p. 236)

& Concatenates

string variables.

+ Concatenates

string

and numeric variables.

-

Compares two strings, returns zero if identical.

A.7.1 String Operations

String Constants

Constant strings can be used in expressions using quotation marks.  For 
example: 

FirstName = "Mike"

String Addition

Strings can be concatenated using the '+' operator.  For example: 

FullName = FirstName + " " + MiddleName + " " + LastName

String Subtraction

String1‐String2 results in an integer in the range of ‐255..+255

String Conversion to/from Numerics

Conversion of strings to numerics and numerics to strings is done 
automatically when an assignment is made from a string to a numeric or 
a numeric to a string, if possible. 

String Comparison Operators

The comparison operators =>,<,<>>= and <= operate on strings.