Specifications

Section 5. Program Declarations
5-7
StationName
Sets the station name.
Syntax
StationName StaName
Remarks
StationName is used to set the datalogger station name with the program. The
station name is displayed in the Status table and stored in the data table headers
(Section 2.4).
Sub, ExitSub, EndSub
Declares the name, variables, and code that form a Subroutine.
Syntax
Sub SubName [(VariableList )]
[ statementblock ]
[ Exit Sub ]
[ statementblock ]
End Sub
The Sub statement has these parts:
Part Description
Sub Marks the beginning of a Subroutine.
SubName Name of the Subroutine. Subname cannot be the same as
any other globally recognized name in the program.
VariableList List of variables that are passed to the Subroutine when it
is called. The list of Subroutine variables to pass is
optional. Subroutines can operate on the global program
variables declared by the Public or Dim statements. The
advantage of passing variables is that the subroutine can
be used to operate on whatever program variable is passed
(see example).
If the Subroutine variable list is used, the variable names
used in this list should not be the same names as variables,
aliases, or constants declared elsewhere. Multiple
variables are separated by commas. When the Subroutine
is called, the call statement must list the program variables
or values to pass into the subroutine variable. The number
and sequence of the program variables/values in the call
statement must match the number and sequence of the
variable list in the sub declaration. Changing the value of
one of the variables in this list inside the Subroutine
changes the value of the variable passed into it in the
calling procedure.
The call may pass constants or expressions that evaluate to