gw-basic

How to create a plain text file in GW-BASIC 2.01?


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?


Solution

  • I Downloaded 2.01 here and used the command:

    open "o",#1,"test.txt" 
    

    from this site.