Language Elements; Character Set; The Basic Program Line - Rockwell Automation Allen-Bradley SLC 500 BASIC Reference Manual

Hide thumbs Also See for Allen-Bradley SLC 500 BASIC:
Table of Contents

Advertisement

Character Set

The BASIC Program Line

1

Language Elements

This chapter introduces you to the elements of a BASIC program. These elements
include BASIC:
• line numbers
• statements, commands, and operators
• line length
BASIC programs are composed of a group of BASIC program lines. Each BASIC
program line is composed of a group of ASCII characters. Refer to Appendix A for
a complete listing of ASCII character codes.
BASIC program lines consist of a BASIC line number and BASIC statements and
operators. BASIC program lines are restricted to the BASIC line length.
BASIC Line Numbers
We refer to BASIC line numbers as:
[ln num]
BASIC line numbers indicate the order that the program lines are stored in
memory and are also used as references when branching and editing. This number
may be any whole integer from 1 to 65535. Typically you start numbering BASIC
programs with line number 10 and increment by 10. This allows you to add
additional lines later as you work on your program.
Since the computer runs the statements in numerical order, additional lines need
not appear in consecutive order on the screen. If you enter line 35 after line 40, the
computer still runs line 35 after line 30 and before line 40. This technique saves
you from reentering an entire program if you forget to include a line.
The first line of your program must be a comment.
IMPORTANT
1
Chapter
Publication 1746-RM001A-US-P

Advertisement

Table of Contents
loading

This manual is also suitable for:

Allen-bradley slc 500 basic-t1746-bas1746-bas-t

Table of Contents