Specifications
Section 9. CR1000 Programming
9-28
EndTable
'Program
BeginProg
Scan (1,Sec,0,0)
'Assign strings to String variables
Wrd(1) = " ":Wrd(2) = "Good":Wrd(3) = "morning":Wrd(4) = "Don't"
Wrd(5) = "do":Wrd(6) = "that":Wrd(7) = ",":Wrd(8) = "Dave"
'Assign integers to Long variables
PhraseNum(1) = 1:PhraseNum(2) = 2
'Concatenate string "1 Good morning, Dave"
Phrase(1) = PhraseNum(1)+Wrd(1)&Wrd(2)&Wrd(1)&Wrd(3)&Wrd(7)&Wrd(1)&Wrd(8)
'Concatenate string "2 Don't do that, Dave"
Phrase(2) = PhraseNum(2)+Wrd(1)&Wrd(4)&Wrd(1)&Wrd(5)&Wrd(1)&Wrd(6)&Wrd(7)&Wrd(1)&Wrd(8)
CallTable Test
NextScan
EndProg
9.14 Program Access to Data Tables
CRBASIC has syntax provisions facilitating access to data in tables or
information relating to a table. Except when using the GetRecord() instruction
(Section 10.15 Data Table Access and Management), the syntax is entered
d
irectly into the CRBASIC program through a variable name. The general
form is:
“TableName.FieldName_Prc (Fieldname Index, Records Back)”.
Where:
TableName = name of the data table
FieldName = name of the variable from which the processed value is
derived
Prc = Abbreviation of the name of the data process used. See TABLE
9
.14-1 for a complete list of these abbreviations – not needed for
values from Status or Public tables.
Fieldname Index = Array element number (optional)
Records Back = How far back into the table to go to get the value
(optional)