QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: FilipeEstima on September 09, 2020, 03:15:17 pm

Title: How to avoid scrolling when printing at last 2 lines?
Post by: FilipeEstima on September 09, 2020, 03:15:17 pm
I need to understand how I can print at last 2 lines of text without making the text to scroll upwards. Whenever I try to print at line 24 or 25, everything is scrolled up. I can't get text to stay at line 24, but at line 25 it's possible - however scroll happens to the other lines.

Code: [Select]
FOR t = 1 TO 22: LOCATE t, 1: PRINT t: NEXT t
SLEEP
LOCATE 23, 1: PRINT 23
SLEEP
LOCATE 24, 1: PRINT 24
SLEEP
LOCATE 25, 1: PRINT 25
SLEEP

Edit: OK, I found out at the VIEW PRINT command explanation at the wiki http://qb64.org/wiki/VIEW_PRINT

Quote
Note: The bottom row of the VIEW PRINT port can be used only when located or prints end with semicolons.

Back to coding :)
Title: Re: How to avoid scrolling when printing at last 2 lines?
Post by: bplus on September 09, 2020, 03:18:35 pm
Make Friends with semi-colon! :)
Code: QB64: [Select]
  1. FOR t = 1 TO 22: LOCATE t, 1: PRINT t: NEXT t
  2. LOCATE 23, 1: PRINT 23;
  3. LOCATE 24, 1: PRINT 24;
  4. LOCATE 25, 1: PRINT 25;
  5.  
Title: Re: How to avoid scrolling when printing at last 2 lines?
Post by: FilipeEstima on September 09, 2020, 03:20:28 pm
Yes bplus, thanks for confirming my discovery :p
Title: Re: How to avoid scrolling when printing at last 2 lines?
Post by: TempodiBasic on September 10, 2020, 06:16:05 pm
Yes you boys are right
wiki says the same of you here https://www.qb64.org/wiki/index.php/PRINT (https://www.qb64.org/wiki/index.php/PRINT)