My dad learnt programming in the 80s and he is still stuck with GW-BASIC (and making a living out of it). He was asked to create a CSV file, but he only knows how to create files of fixed-width records.
I found on the web that the syntax for opening plain-text files is:
OPEN file$ FOR OUTPUT as #1
but he claims it doesn't work. The interpreter he uses is the version 2.01. According to Wikipedia, the most "modern" version is 3.23 (1988).
Does anyone know how to create a plain-text file in such an outdated version of GW-BASIC?
I can confirm that:
OPEN "FOO.TXT" FOR OUTPUT AS #1
was the syntax used to create text file FOO.TXT in GW-BASIC.
If that command did not exist in version 2.01 probably there wasn't any way to do this in that version. EDIT: I was wrong, see marg's answer. It existed but with a more difficult syntax to remember.
If your father saved the program in which he has to create this file this as ASCII:
SAVE "PROG.BAS",A
Then it is likely that he would be able to load it in any of GW-BASIC 3.32, QBASIC, QuickBASIC, and perhaps even Visual Basic, and then be able to use this command.
I Downloaded 2.01 here and used the command:
open "o",#1,"test.txt"
from this site.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With