Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
! ! open"text.txt" for input & output ! ! ques
#2
1)
Code:
INPUT youCanUseAStringVariable$
OPEN youCanUseAStringVariable$ FOR OUTPUT AS #1

2)
You can open more than one file at a time. For example, to copy stuff from "source.dat" to "dest.dat", you could make "source.dat" #1, and "dest.dat" #2.

You can pick any number you want, even #53 should work.

3)
The first time, INPUT gives you the first line. But if you do it again, it'll give you the second, etc... example:
Code:
OPEN "blah.txt" FOR INPUT AS #1
LINE INPUT #1, firstLine$
PRINT firstLine$
LINE INPUT #1, secondLine$
PRINT secondLine$
CLOSE
...and you could put LINE INPUT in a loop if you want to get a lot of lines.
Reply


Messages In This Thread
! ! open"text.txt" for input & output ! ! ques - by Sterling Christensen - 09-01-2004, 09:46 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)