EasyManua.ls Logo

Campbell CR800 Series - Conserving Program Memory; Program Statements; Programming Syntax; Inserting Comments

Campbell CR800 Series
598 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Section 7. Installation
124
Inserting Comments
'This program example demonstrates the insertion of comments into a program. Comments are
'placed in two places: to occupy single lines, such as this explanation does, or to be
'placed after a statement.
'Declaration of variables starts here.
Public Start(6) 'Declare the start time array
BeginProg
EndProg
7.6.2.2.2 Conserving Program Memory
One or more of the following memory-saving techniques can be used on the rare
occasions when a program reaches memory limits:
Declare variables as DIM instead of Public. DIM variables do not
require buffer memory for data retrieval.
Reduce arrays to the minimum size needed. Arrays save memory over
the use of scalars as there is less "meta-data" required per value.
However, as a rough approximation, 192000 (4 kB memory) or 87000 (2
kB memory) variables will fill available memory.
Use variable arrays with aliases instead of individual variables with
unique names. Aliases consume less memory than unique variable
names.
Confine string concatenation to DIM variables.
Dimension string variables only to the size required.
Read More More information on string variable-memory use and
conservation is available in String Operations (p. 303).
7.6.3 Programming Syntax
7.6.3.1 Program Statements
CRBasic programs are made up of a series of statements. Each statement
normally occupies one line of text in the program file. Statements consist of
instructions, variables, constants, expressions, or a combination of these.
"Instructions" are CRBasic commands. Normally, only one instruction is
included in a statement. However, some instructions, such as If and Then, are
allowed to be included in the same statement.
Lists of instructions and expression operators can be found in CRBasic Editor
Help
(p. 122).

Table of Contents

Related product manuals