In BB4W 6.15a I try using the following code/idea:
Code: Select all
DEF PROCprettyPrint(spoolname$)
LOCAL !536 : REM LOCAL SPOOL channel number
VDU 21
OSCLI"SPOOL " + spoolname$
<code that has PRINT statements>
*SPOOL
VDU 6
ENDPROC
It works but I think the editor crashed sometimes....
Can't reproduce the crash but I can imagine that, suspending main SPOOL output like this and then creating a new, local SPOOL and restoring the SPOOL channel number for the main code upon exiting the PROC, could maybe mess up the interpreter internally. I.e. buffering maybe?
All, I need to know is, if it's wise to do this trick. I.e. should it technically work?
Thanks
Mike