![QSI QTERM-R55 User Manual Download Page 15](http://html1.mh-extra.com/html/qsi/qterm-r55/qterm-r55_user-manual_3304037015.webp)
QSI Corporation Fax 801-466-8792 Web www.qsicorp.com Phone 801-466-8770
C
HAPTER
2.
QA
BASIC
The QTERM-R55 is a user programmable operator inter-
face terminal for industrial applications. The terminal is
programmed using qaBASIC, a dialect of the common and
simple BASIC programming language. The BASIC pro-
gram can be written using any computer text editor and
then downloaded into the terminal and stored in non-vola-
tile memory. This program is executed after power is
applied to the system. The program may be updated
through the Power-On Setup menu; see section 1.1.
qaBASIC is a modified version of YABASIC, a BASIC
compiler and runtime execution engine written by Marc
Oliver Ulm. Much of this chapter was derived from the
documentation that is included with the YABASIC distri-
bution. YABASIC is distributed under the terms of the
GNU Public License which allows modification and redis-
tribution of the software provided that the same license
applies to the modified version. Source code for the
YABASIC modification may be obtained from QSI upon
request. Contact QSI for details. Refer to the LICENSE file
included on the distribution disk for more information on
the GNU Public License.
The QTERM-R55 also uses uC/OS, the Real Time Kernel,
by Jean Labrosse.
2.1
Syntax
2.1.1
Case
Commands can be entered in any case.
input
is the same as
INPUT
and even as
InPUt.
This
applies to every command in qaBASIC.
2.1.1.1
Variables
Variable names are case sensitive (i.e. types of variables:
a$
and
A$
are different) and can be of any length. There
are two sorts of variables:
2.1.1.2
String Variables
String variables always have a dollar sign (
$
) as the last
character of their names, e.g.,
a$
,
b12$
or
VeryLong-
Name$
and may contain strings of any length. String vari-
ables can contain any characters except the NULL
character (ASCII 0).
2.1.1.3
Numerical Variables
a
,
c3po
or
ThisIsAnEvenLongerName
are examples
of numerical variables and can contain real numbers like -
1.3, 2, 15.3e44 or 0.
Variables (with the exception of arrays) need not be
declared; their initial values are "" (for string variables) and
0.0 (for numerical variables).
2.1.1.4
Multiple Commands on One Line
More than one command can appear on one line. The com-
mands must be separated with colons.
2.2
Introduction to qaBASIC
Example 1:
REM this is the first R55 BASIC program
input "Enter two numbers:" a,b
print a,"+",b,"=",a+b
print "Please enter your Name:";
INPUT a$
print "Hello ",a$," !"
This program produces the following output (user input is
displayed
using this typeface
):
Enter two numbers:
2 3
2+3=5
Please enter your Name:
Bill
Hello Bill !