Ram -19 rem -19, Purpose, Syntax – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 59: Example

Advertising
background image

Publication 1746-RM001A-US-P

BASIC Commands 4-19

RAM

Purpose

Use the RAM command to tell the module interpreter to select the current
program out of RAM. The current program is displayed during a LIST command
and executed when

RUN

is typed.

Available user RAM = MTOP–H

H

= LEN + S + 6*A +

8*V + 512

Where:

LEN

=

system control value that contains current RAM program

length

S

=

number of bytes allocated for strings (first value in the

STRING instruction)

A

=

sum of all (array sizes +1)

V

=

sum of all variable names used (including each array name)

Syntax

RAM

Example

READY

>RAM

REM

Purpose

Use the REM command to specify a comment line in a BASIC program. Adding
comment lines to a program makes the program easier to understand. Program
lines that start with a REM command cannot be terminated with a colon (:). REM
commands can be placed after a colon (:) in a program line. This allows you to
place a comment on each line.

IMPORTANT

RAM space is limited to 24K bytes. Use the following formula to
calculate the available user RAM space

IMPORTANT

REM commands add time to program execution. Use them
selectively or place them at the end of the program where they do
not affect program execution speed. Do not use REM commands
in frequently-called loops or subroutines.

Advertising