beautypg.com

A.1.1 variable declarations & modifiers – Campbell Scientific CR800 and CR850 Measurement and Control Systems User Manual

Page 452

background image

Appendix A. CRBasic Programming Instructions

452 

 

 

Syntax 

Sub

subname (argument list)

[statement block]

Exit Sub

[statement block]

End Sub

WebPageBegin / WebPageEnd 
See Information Services

 (p. 167).

 

A.1.1 Variable Declarations & Modifiers

Alias 
Assigns a second name to a variable. 

Syntax 

Alias [variable] = [alias name]; Alias [array(4)] = [alias

name], [alias name(2)], [alias name]

As 
Sets data type for Dim or Public variables. 

Syntax 

Dim [variable] AS [data type]

Dim 
Declares and dimensions private variables. Dimensions are optional. 

Syntax 

Dim [variable name (x,y,z)]

ESSVariables 
Automatically declares all the variables required for the datalogger when used in 
an Environmental Sensor Station application. Used in conjunction with 
ESSInitialize

Syntax 

ESSVariables

NewFieldNames  
Assigns a new name to a generic variable or array. Designed for use with 
Campbell Scientific wireless sensor networks. 

Syntax 

NewFieldNames(GenericName, NewNames)

PreserveVariables 
Retains values in Dim or Public variables when program restarts after a power 
failure or manual stop. 

Syntax 

PreserveVariables

Public 
Declares and dimensions public variables. Dimensions are optional. 

Syntax 

Public [variable name (x,y,z)]