5 - operating functions, Chapter objectives, Definition of terms – Rockwell Automation 1771-DB Basic Module User Manual - Series A User Manual
Page 38: Commands, Statements, Operating functions

Chapter 5
Operating Functions
After reading this chapter you should be familiar with the BASIC
instruction set and be ready to begin BASIC programming.
This chapter
is a reference section
to help you with module programming. You
should
already be familiar with BASIC programming.
The following sections define the following terms: commands, statements,
format
statements, data format, integers, constants, operators,
variables, expressions, relational expressions,
system control values,
argument stack and control stack.
The BASIC module operates
in two modes, the command or direct
mode
and the interpreter or run mode. You can only enter commands
when the
processor is in the command or direct mode. This document
uses
the terms run mode and command mode to refer to the two
different
operation modes.
A BASIC program consists
of statements. Every statement begins with
a line
number, followed by a statement body, and terminated with a
carriage
return (cr), or a colon (:) in the case of multiple statements per
line.
There are three types of statements: assignments, input/output and
control.
Every line in a program must have
a statement line number ranging
between
0 and 65535 inclusive. BASIC uses this to order the
program statements in sequence.
You can use a statement number only
once in a program.
BASIC automatically
orders statements in ascending order.
A statement
may not contain more than 79 characters.
BASIC ignores
blanks (spaces) and automatically inserts them during
a LIST command.
5.1
Chapter Objectives
5.2
Definition of Terms
5.2.1
Commands
5.2.2
Statements