• YOU can help the next generation of students in the community!
    Share your trial papers and notes on our Notes & Resources page

QBasic Assistance Topic (1 Viewer)

allGenreGamer

Member
Joined
Nov 26, 2003
Messages
111
Anyone who needs help with QBasic just ask here, I have a question already:

In QBasic:
- How do i open a txt file for text editing?
- How do I save a text into a .txt file?

Thanks a advance :)
 

Fosweb

I could be your Doctor...
Joined
Jun 20, 2003
Messages
594
Location
UNSW. Still.
Gender
Male
HSC
2003
Same as for any basic language really:

Open FileName for AccessMode as #FileNum
.
Close #FileNum

Where you can open it as input/output/append/random

To write to file:
Inside your opening syntax:

WRITE #Filenum, expression
or
PRINT #Filenum, expression


To read from file:

INPUT #FileNum, variable


Random access files: use GET and PUT
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top