The code demonstrates how a programmer needs to use the second routine to fill a screen with STRING$() in both QBasic and QB64, but the surprise was the second PRINT statement in the demo will appear on row #1 in QBasic, as expected, but in QB64, it will appear on row #2!
PRINT "This will not fill the screen, as intended..."
SLEEP
CLS
x$ = STRING$(80 * 25, 219)
PRINT x$;
SLEEP
CLS
PRINT "But this will..." ' Why does this PRINT statement appear on row #2 in QB64, after a CLS statement?
SLEEP
CLS
x$ = STRING$(80 * (25 - 1), 219) ' Print all but last row.
PRINT x$;
LOCATE _HEIGHT, 1
PRINT STRING$(80, 219); ' Print last row, separately to fill in the entire screen.
SLEEP
TheBOB was good enough to run it for me in his QBasic program, and reported that in QB, both messages are printed, as expected, on row #1, but for some reason, using the STRING$() statement in QB64 causes the second PRINT statement to appear on row #2, even though the statement directly before it is CLS. I would call this some sort of a bug, or is it just an incompatibility?
Pete