how to view output while program is running
how to view output while program is running
How can I see my output as it is being generated? is there any way I can view my output file (either the one generated by the PRINT command, or the one generated by theWRITE command?
new user, but willing to learn
Re: how to view output while program is running
Well, "as it is being generated", is a bit tough if what you mean is to see it on the fly. However, if you'll settle for being able to review all the generated output at the end, you can add a little "audit trail file" or "log file" to your program.pronoland wrote:How can I see my output as it is being generated? is there any way I can view my output file (either the one generated by the PRINT command, or the one generated by theWRITE command?
Open a file for output, and call it "log". Everytime the program outputs something, either to the screen or to an output file, write the same data to the log file. If you output both to the screen and a file, or multiple files, prefix the data with the word "screen:" or "File1:" or "file2:". Later when you review the log file, you can tell where the data was written to.
If your program also has keyed input which afects the output, you can also write this keyed data onto the log file with a prefix like "keyin:".
If your program has an input file which it reads, and which is related to the output that it generates, you can also write this input data to the log file with a prefix like "input:".
If you do all this, then after the program is run, you can review the log file with any text editor and see everything that went on. To make it even more attractive, you can prefix every record onto the log file with a date and time stamp. Such a complete log file can be called an "audit trail" file because it shows everything that happened and when it happened.
Regards..... Moneo
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Just print it to the screen also
Wherever you produce output, also print it to the screen.
Example
PRINT #1, "Total: "; TotalSales
would be changed to
PRINT #1, "Total: "; TotalSales
PRINT "Total: "; TotalSales
Example
PRINT #1, "Total: "; TotalSales
would be changed to
PRINT #1, "Total: "; TotalSales
PRINT "Total: "; TotalSales
Re: Just print it to the screen also
burger2227 wrote:Wherever you produce output, also print it to the screen.
Example
PRINT #1, "Total: "; TotalSales
would be changed to
PRINT #1, "Total: "; TotalSales
PRINT "Total: "; TotalSales
what you can also do is add a pause to this.....
so the program prints one line of output to the screen..pauses
then prints another line...pauses....then your output slowly
scrolls down your screen so you can view it....
look up SLEEP for a quicky way to do it.....