Appendix B. Introduction to CRBasic Programming
B-2
CRBasic Example B-1. CRBasic Program Structure
'Declarations
'Define Constants
Const RevDiff = 1
Declare constants
Const Integ = 400
Const Mult = 1
'Define public variables
Public RefTemp
Public TC(6)
Declare public variables,
dimension array, and declare
units.
Declarations
'Define Units
Units RefTemp = Deg C
Units TC = Deg C
'Define data tables
DataTable(Temp,1,2000)
DataInterval(0,10,min,10)
Define data table
Average(1,RefTemp,FP2,0)
Average(6,TC(),FP2,0)
EndTable
'Begin Program
BeginProg
'Set scan interval
Scan(1,Sec,3,0)
Measure
PanelTemp(RefTemp,400)
'Processing (None in this
Scan loop
Call data table
'Call data table
CallTable Temp
'Loop to next scan
'End Program
B.1 Comments
Comments are nonexecutable text in the body of a program. Comments
document or clarify the program. As shown in CRBasic Example B-2, insert
comments into a program by preceding the comment with a single quote (').
Comments can be entered either as independent lines or following CR300