Talk:PRINT

From C64-Wiki
Jump to navigationJump to search

How about this fact-box for BASIC commands?[edit source]

I have created an experimental template for articles like this one, describing a particular BASIC keyword.

If I don't get any "wild protests" about it, I plan to move the template out of it's current "test bench" and into Template:BASIC keyword, and rig up fact box on all relevant articles. If you don't like the idea, it's easy to delete the template code at the beginning of the article.

BinaryDane 18:47, 7 October 2007 (CEST)

After more than two weeks with no objections, I've now moved the template to the name mentioned above, and will put these templates into existing articles on BASIC keywords... – BinaryDane 22:00, 22 October 2007 (CEST)

Question about semicolons[edit source]

I am curious about the statement "a space character is printed after the number" - is this ONLY in the case of a trailing semi? Or does it ALWAYS print a space after numbers no matter what follows? Maury Markowitz (talk)

It prints always a space (to be correct, on the default output file, which is the screen, a cursor right, but on other files deviating from the default a space character). This is part of the printing for numerical expressions (as opposed to string expressions).
Try
10 printchr$(147);
20 fori=1to10:print"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx":next
30 a=123.456
35 open1,3:cmd1
40 printchr$(19);a
50 print"...."
100 print#1:close1
There you can see, that the space is printed regardless of a semicolon is used or not (in this case not, but change line 40 accordingly). The OPEN combined with CMD creates a non default file (which is still the screen), but forces the output routine to use the "blank character".
--JohannKlasek (talk) 00:14, 18 December 2020 (CET)

Excellent work Johann, I've updated my parser to work this way. Maury Markowitz (talk)