2

Is there a way of saving the output when running a program in Qbasic?

The thing is, the program I run has a lot of output. I've already adjusted the screen size. While that can work sometimes, even that has its limitations with too much output. For some reason, I can't scroll the run screen up or down or anything.

Perhaps there is also a way to change the text size of output. But again, limitations here as well.

Therefore, is there a way to save the output to a file type like .txt, .nfo, etc. where I can read it in an easier to use format?

Sep Roland
  • 33,889
  • 7
  • 43
  • 76
Blazed
  • 21
  • 1

1 Answers1

1

Yes. Instead of printing to the screen, print to a file, with something like this:

OPEN “file.txt” FOR OUTPUT AS #1
FOR linenum = 0 TO numoflines -1
  PRINT #1, line$
NEXT linenum
CLOSE #1
END
Sep Roland
  • 33,889
  • 7
  • 43
  • 76
Robert Talada
  • 317
  • 1
  • 10
  • 1
    Your `FOR-NEXT` example could confuse the OP even more! You should indicate that *line$* has to be filled with new content once per iteration. Or else write it using an array like `PRINT #1, line$(linenum)`. – Sep Roland Oct 05 '20 at 22:03