QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: badger on September 25, 2020, 07:36:10 pm

Title: locate statments
Post by: badger on September 25, 2020, 07:36:10 pm
Hello

i am writing some code learning qb64 from qb4.5. I noticed that to make the locate statements to work as needed i have to put a simi colon at the end of each print statement. is this correct

Badger
Title: Re: locate statments
Post by: bplus on September 25, 2020, 07:43:46 pm
LOCATE is actually a different statement from PRINT

PRINT allows: nothing, semi-colon and comma depending if you want the cursor on the next line (nothing), the cursor right where it left of (semi colon) and tabbed (on same line if fits) use comma. By cursor I mean the start of the next PRINT unless LOCATE redirects the cursor = next print location.

Usually good to use semi colon with allot of LOCATE and PRINT statements to avoid scrolling near end of screen or font changing to _FONT 8 from default 16.

Welcome to the forum! @badger
Title: Re: locate statments
Post by: badger on September 25, 2020, 07:48:31 pm
Hello

Thanks for the fast response. I went crazy tying to figure out what was happing i use locate statement to put the curser ware i wanted but it all went to the next line. just put in a semi colon and it worked just saying

Badger
Title: Re: locate statments
Post by: SMcNeill on September 25, 2020, 07:49:21 pm
Hello

i am writing some code learning qb64 from qb4.5. I noticed that to make the locate statements to work as needed i have to put a simi colon at the end of each print statement. is this correct

Badger

This is correct, if you’re printing down onto the bottom two rows of the screen.  Without that semi-colon, the screen will automatically scroll up for you.

For anywhere else, it’s not really necessary, unless you just wish for your print position to be directly at the end of your last print command; otherwise it’ll move automatically to the next line.
Title: Re: locate statments
Post by: badger on September 25, 2020, 07:53:05 pm
Hello

yes you may smack me i did read the fact that you said the last rows i see now that answers some questions i have had since my days with quick basic .

Thank you very very much.

Badger
Title: Re: locate statments
Post by: SpriggsySpriggs on September 26, 2020, 12:37:24 pm
Hello @badger
Welcome to the forum!
Title: Re: locate statments
Post by: badger on September 26, 2020, 01:17:25 pm
Hello

Thanks for the welcome.

Badger