![JK microsystems Flashlite 186 Скачать руководство пользователя страница 25](http://html.mh-extra.com/html/jk-microsystems/flashlite-186/flashlite-186_user-manual_2018850025.webp)
19
Flashlite 186
User’s Manual
JK
microsystems
QuickBASIC/PowerBASIC Console I/O
Some of the code produced by Microsoft QuickBASIC compiler does not execute properly on the
Flashlite. In the case of console I/O, we believe that QuickBASIC is generating code for specific
hardware and software not present on the Flashlite.
There are two problems with console I/O. The first is that a
statement will not send output
to the console port. To output text to the console, open “cons:” as a file and print to it. The
second problem is that an
INPUT
statement will not echo the data entered by the user.
Workarounds for both of these problems can be found in the program BAS_INP.BAS on the
utilities CD /Example subdirectory and shown here:
start:
OPEN "o", 1, "cons:"
PRINT #1, ""
PRINT #1, "Quickbasic/PowerBasic Input Program"
PRINT #1, " Enter a string.........> ";
GOSUB linein
InputString$ = linein$
PRINT #1, InputString$
PRINT #1, " Enter a numeric value..> ";
GOSUB linein
InputNumber = VAL(linein$)
PRINT #1, InputNumber
CLOSE 1
END
linein:
linein$ = ""
linemore:
a$ = INKEY$
IF a$ = "" THEN GOTO linemore
IF a$ = CHR$(13) THEN GOTO linedone
IF a$ <> CHR$(8) THEN GOTO getchar
PRINT #1, CHR$(8); CHR$(32); CHR$(8);
linein$=left$(linein$,(len(linein$)-1))
GOTO linemore
getchar:
PRINT #1, a$;
linein$ = linein$ + a$
GOTO linemore
linedone:
PRINT #1, ""
RETURN
Specifications
Содержание Flashlite 186
Страница 1: ...Flashlite 186 User s Manual ...
Страница 2: ......
Страница 6: ...JKmicrosystems Flashlite 186 User s Manual iv ...
Страница 17: ......
Страница 27: ...21 Flashlite 186 User s Manual JKmicrosystems Contact Information ...