#Formatted Print
5 messages in this thread
I have been having a problem with formatted printing to RAM. Formatted
printing to LCD or to the printer works fine. Note that the following test
program prints to the screen OK, but sends garbage to the RAM file
periodically, AND eventually crashes with a TM (type mismatch) error on line
#50 after printing 10 lines. If you only have the first part of the format
string (F$="###### "), the program does not crash, but it still sends garbage
to the file.
10 REM TEST1.BA
15 F$="###### \ \ "
20 OPEN "DATA1.DO" FOR OUTPUT AS 1
30 T$="This is a test. ":N=1
40 PRINT USING F$;N;T$
50 PRINT #1,USING F$;N;T$
60 N=N+1:GOTO 40 Has anyone else experienced this problem? Do I have a
bad ROM? Is there a fix? Any help will be appreciated.
Regards,
rod
Rod:
There is a known PRINT USING bug that has been batted about and worked
around for the last couple of years. Unfortunately, I don't bermember the
details of getting around the problem but I suspect that what you must do is
forget the F$ and stick to the plain vanilla PRINT USING "###### \ \"; N;T$
approach — no guarantees though!!
Might peek at BUGS.100; it has been around for eons and may handle your
question if'n nobody pops in to help.
Good luck …
USING the 100 ….
.^Dave^.
Thanks Dave. I'll try PRINT USING "###" etc, instead of F$.
Surprise! If you look very carefully at your M100 manual, you'll see that only
constant (literal quoted strings, not expressions) formats are supported in
PRINT USING in M100 BASIC. LOTS of folks have had this problem. For what it's
worth, it ONLY seems to bite you when the output device is RAM – COM, MDM, LCD,
Chipmunk, etc. aren't affected. Sorry! – tim
Thanks Tim. I'll try using a literal instead.