Page 1 of 1

QBasic Program output to be stored to a .txt or .csv or .dat

Posted: Tue Sep 09, 2014 8:14 pm
by logamuthu
I need help for QBasic 1.1 program output to be stored in a .txt / .csv / .dat file in my Hard Disc for later read / printout etc.,

I have been using QBasic.1.1 for over 2 decades - see a sample .bas
program and supported .dat files attached herewith.

The results of running this program get displayed on the screen and
vanish in the next keystroke - I am unable to save the results in a
file .txt / .dat / .csv file in my hard disk.

I have tried the <redirect> function of MS DOS but the system just hangs.

Please help me!

Re: QBasic Program output to be stored to a .txt or .csv or

Posted: Thu Sep 11, 2014 7:39 am
by burger2227
We'd have to see your code to see what you are trying to do. Please put code inside of the CODE box buttons.

As to file attachments here, you would have to supply a link address to Drop box or such.

OPEN filename$ FOR OUTPUT AS #1 clears a file for new data using PRINT # or WRITE # for CSV files.
OPEN FOR APPEND adds data to the end of a new or previously written to file.

OPEN FOR BINARY or RANDOM use GET# or #PUT simultaneously to read or write.