beautypg.com

Basic programming guide – Remote Processing BASIC for the CX-10 Modbus User Manual

Page 59

background image

BASIC PROGRAMMING GUIDE

2-50

REM

Syntax:

REM any ASCII text

Function:

Allows remarks in a program or on command line

Mode:

Command, run

Use:

100 REM You can put any thing you want here
REM This remark has no line number so will be discarded by BASIC-52

DESCRIPTION

The REM instruction lets you add comments to your program. Any text after a REM is ignored. REM
instructions cannot be terminated with a colon, but they can follow colons. BASIC-52 lets you use REM in
command mode and while downloading programs. A REM without a preceding line number is ignored by
BASIC-52. This allows you to place comments in an off-line source code text file and have them stripped out
when you download the text file to the card.

Appropriate comments make your programs easier to understand and maintain, but do slow program
execution and consume program memory.

Multiple statements per line following a REM are ignored since they are considered part of the remark. Refer
to the example.

EXAMPLE

100

REM A comment

120

PRINT A :REM PRINT A+2

>run

0