Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Set cursor ignoring y value

Author
Message
Somarl
13
Years of Service
User Offline
Joined: 11th Feb 2011
Location: UK
Posted: 13th Mar 2011 13:32
Take this code:


For a very simple scancode generator.
Now the y co-ordinate is acting very strange because no matter what you type up to a certain point the text does not move down as i believe it should. When you get to a certain point (around the 450 mark which in my opinion should be long gone from the screen (as its only 200 down) it starts cutting the font off. Then after about 500 it has disappeared. Whats happening here and how might i avoid it?
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 13th Mar 2011 14:26
You could use the TEXT command:


This will always print it at 65,100.

Somarl
13
Years of Service
User Offline
Joined: 11th Feb 2011
Location: UK
Posted: 13th Mar 2011 15:31
Yeah that would work, I just wanted to know why in this instance it wasnt working as expected. I am not sure what is wrong either with the program or my logic in thinking what it should do.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 13th Mar 2011 23:41
You made the screen too small and the font too big for it to move down from 65,100.

With CLS and SET CURSOR in the DO/LOOP it's always going to be in the same spot because it clears the screen and resets the cursor location to 65,100. If you put the CLS and the SET CURSOR outside of the DO/LOOP and rem off the screen size you'd see the text moving down from 65,100.



Somarl
13
Years of Service
User Offline
Joined: 11th Feb 2011
Location: UK
Posted: 14th Mar 2011 13:03
I knew i was doing something wrong somewhere. Thanks for this.

Login to post a reply

Server time is: 2024-11-22 23:03:53
Your offset time is: 2024-11-22 23:03:53