https://logiker.com/Vintage-Computing-C ... lenge-2024
Was interesting: making the most smaller program. My version was presented in standard QL SuperBASIC.
The result:
With QL I have obtained a file of 87 bytes, although an 88 bytes file was submitted in case it was not accepted without a line number:
Code: Select all
PRINT,"\O/":FOR i=0TO 18:IF i MOD 9:PRINT"!"," !"," !":ELSEPRINT"+--------+--------+"
Code: Select all
1PRINT,"\O/":FOR i=1TO 18:PRINT"!"," !"," !"
2FOR i=1,10,19:AT i,0:PRINT"+--------+--------+"
The comma (,) acts as a tabulator together with the PRINT, thus including 8 spaces.
In the FOR, the 0 in the case above, and the 1 in the case below, can be attached to the TO that indicates the range of values.
The FOR supports values separated by commas as well as ranges, as in FOR i=1,10,19.
The PRINT can be attached to the quotation marks. A curious case is the ELSEPRINT, which SuperBASIC reads and separates without problem (this does not work with the Minerva ROM)
And yes, both the IF and the FOR can be placed on the same line without closing, that is, they do not need END IF or END FOR, in the case of the IF it does not even need THEN.
You have already seen the result, and now you know a little more about the power of pure SuperBASIC.
Both programs can be loaded with LOAD. The one without a line number will be executed immediately. The second one requires RUN. Both can also be loaded and executed directly with LRUN.
Download: