Xl™ series – Xylem XL Series H-522 - Plus User Manual

Page 248

Advertising
background image

23-2 XL-BASIC Programming Guide

XL™ SERIES

program includes all commands, comments, remarks, and spacing. If the size of the file becomes
too big then cut down on the remarks or the spacing, or break the tasks into two separate
programs.

Variables:

Since the system is limited on RAM, and to keep the operation of the BASIC programming
simple, only predefined variables will be used. All variables types will be double precision
floating point variables. All standard system variables will be accessible to the XL-BASIC
interpreter plus some generic variables used only by the XL-BASIC interpreter system. In the
program the variables may be upper or lower case, here they are shown in lower case.

Main BASIC Program Variables:

Variable
Name

Type

Description

basic1
basic2
basic3
basic4
basic5

Read / Write

These variables are used to return values from Basic program 1
to 5 to the menu option calling the BASIC program. These
variables are initialized to 0.0 when scanning is enabled, and
will retain any modifications between scans. On return the value
will depend on the users BASIC program.

The basicx Variable:

This is not a separate variable but is actually an indirect link to one of the normal basic variables,
1 to 5. A program can return a value using the variable associated to the location number where
the basic program is loaded. For example a program loaded into basic program location 1 must
use the variable basic1 as the return variable. Now a program can use the name basicx as the
return variable which allows the program to be loaded in any program location. If loaded into
program location three, then when the program updates the basicx variable it is actually updating
the variable basic3.

General Purpose Variables:

Variable
Name

Type

Description

a to z

Read / Write

26 General purpose variables initialized to 0.0 when scanning is
enabled. Any value changes will be retained between program
execution and between scans

Advertising
This manual is related to the following products: