dattier@ddsw1.MCS.COM (David W. Tamkin) (10/17/90)
Gregg Riedel wrote in <4185@bingvaxu.cc.binghamton.edu>: R> The answer to the BASIC (runnable) to text question was in my R> earlier post, but I'll repeat it. You were right, it's much simpler R> than text -> basic. And this correction to Gregg's earlier post was in *my* earlier post, but I'll have to repeat that too. R> OPEN 5,8,4,"0:filename,s,w" R> CMD 5: LIST (the CMD command changes the default output from screen R> to wherever you want (like CMD 4 sends to the printer...)) You absolutely must PRINT#5 (or PRINT#5; to avoid sending another <cr> to the disk file) before closing the file after a CMD or you'll be in pretty bad trouble. So before you close the file, PRINT#5; *Then* close the output file: R> CLOSE5 R> It's that simple. Almost. And CTuna@cup.portal.com, who gives no personal name but just the business name "Image - BBS," wrote in <34829@cup.portal.com>: I> This one is easy to handle. Simply load your basic program, then type the I> following: I> open2,8,2,"name of file,s,w":cmd2:list Again, you need to print#2 or print#2; here to avoid trouble. Cmd sends a listen signal to the device associated with that file and leaves it still listening. Print# writes to a device and then tells it to stop listening, and trying to close a logical output file without unlistening the device leaves everything in a very confused state. Try it, folks. (Get# and input# always untalk the device after executing; there is no way in Commodore BASIC to leave an input device talking.) So, print#2; : rem, and now it is safe to close the file, so I> close2 I> This will dump the entire listing of your basic program in sequential I> file form to the disk. :D Leave out the print#2 or print#2, CTuna, and you won't have that grin on your face for long. __ David Tamkin Box 7002 Des Plaines IL 60018-7002 708 518 6769 312 693 0591 MCI Mail: 426-1818 GEnie: D.W.TAMKIN CIS: 73720,1570 dattier@ddsw1.mcs.com