Tandy 1000 Basic Reference Manual page 186

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter
10 I
BASIC Keywords
Sample Programs
This program shows how you can use INPUT$ to have an opera-
tor input a password for accessing a protected file. By using IN-
PUT$, you can type in the password without anyone seeing it on
the video display. To see the full file specification, run the pro-
gram. When the BASIC prompt returns, type PRINT F$.
1 1 0 L I N E I N P U T " T Y P E
I N T H E F I L E N A M E . E X T " ;
F $
1 2 0 P R I N T " T Y P E
I N THE PASSWORD
- -
MUST T Y P E 8
CHARACTERS :
"
;
1 3 0 P $
=
I N P U T $ < 8 )
1 4 0 F $
=
F $
+
' I . "
+
P $
1 5 0 P R I N T "YOUR
F I L E N A M E I S " ;
FS
In the program below, Line 100 opens a sequential input disk
file (which we assume has been previously created). Line 200 re-
trieves a string of 70 characters from the file and stores them in
T$. Line 300 closes the file.
1 0 0 OPEN
" I " ,
2 ,
" t e s t . d a t "
2 0 0 T $ = I N P U T $ < 7 0 , 2 )
3 0 0 C L O S E
184

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents