![QSI QTERM-R55 Скачать руководство пользователя страница 22](http://html1.mh-extra.com/html/qsi/qterm-r55/qterm-r55_user-manual_3304037022.webp)
12
QTERM-R55 User's Manual
QSI Corporation Fax 801-466-8792 Web www.qsicorp.com Phone 801-466-8770
Arrays can be used to process large quantities of data.
There are numerical arrays as well as string arrays. Both
need to be declared prior to their first use. This is necessary
because qaBASIC needs to know how much memory has to
be allocated for the array.
The
dim
keyword is used to declare arrays. Example 8 uses
dim names$(maxnum)
to declare a string array.
Another example would be
dim
numbers(200)
to cre-
ate a numerical array with 200 elements numbered 0 to 199.
More complex tasks may even require multidimensional
arrays with more than one index.
dim matrix(10,10)
defines a two dimensional array. Up to 10-dimensional
arrays are supported by qaBASIC.
2.8
Interaction with System Hardware
Example 10:
print date$," ",time$
cursor blink
cursor at(2,3)
a$="12345":a=4
send #COM1 a$
send #COM1 a
a$ = recv$ #COM1
a = recv #COM1
print #COM1 a$,a
led 3 on
led 4 off
backlight on
bell
pause 10
This program produces the following output (phrases in
parentheses describes actions taken by the QTERM-R55,
not output to the display):
5 28 08 98 13:51.53
(cursor set to blink)
(cursor moves to column 2, row 3)
(str$ "12345" sent out COM1)
(num 4 sent out COM1)
(COM1 input stored into str$ a$)
(COM1 input stored into num a)
(string in str$ a$ and number in num a
is sent out COM1)
(LED 3 is turned on)
(LED 4 is turned off)
(backlight is turned on)
(a speaker beep is made)
(execution stops for 10 seconds)
2.8.1
Date and Time
NOTE: The
date$
and
time$
commands are only sup-
ported for QTERM-R55 terminals with the optional real-
time clock installed.
The
date$
output string has four fields (see Example 10):
5
is the day of the week (1-7, 1 is Sunday, 7 is Saturday),
28
is the day of the month (01-31),
08
is the month (01-12)
and
98
is the year.
Figure 2-1. QTERM-R55 Keypad LEDs.
LED 1
LED 2
LED 3
LED 4
LED 5
SHIFT
LED 1
LED 2
LED 3
LED 4
SHIFT
Содержание QTERM-R55
Страница 4: ......
Страница 6: ...ii QTERM R55 User s Manual QSI Corporation Fax 801 466 8792 Web www qsicorp com Phone 801 466 8770...
Страница 10: ...vi QTERM User s Manual QSI Corporation Fax 801 466 8792 Web www qsicorp com Phone 801 466 8770...
Страница 14: ...4 QTERM R55 User s Manual QSI Corporation Fax 801 466 8792 Web www qsicorp com Phone 801 466 8770...
Страница 34: ...24 QTERM R55 User s Manual QSI Corporation Fax 801 466 8792 Web www qsicorp com Phone 801 466 8770...