LOCATE 25 problem?

This problem has bugged me for a long time! I set the screen size to 25 lines. How come, then, when I try to use the LOCATE statement on lines 24 or 25, it doesn't work?

LOCATE 24 seems to shift the whole screen up one line, and then locate the cursor on line 23. LOCATE 25 locates on the correct line, but only after shifting the whole screen up a line aswell. Look at this program if you don't understand what I'm talking about:
[code]
CLS: WIDTH , 25
LOCATE 1: PRINT "Line 1 - this line should never disappear!"
FOR i% = 20 TO 25
LOCATE i%: PRINT "Line"; i%; ", press any key to continue"
i$ = INPUT$(1)
NEXT i%
[/code]
Is there any way to put text on either of these two lines without this happening?

Comments

  • Hi,
    Take a look at this program.
    Using ; wit the print statement usually helps.

    CLS
    FOR x = 1 TO 25
    LOCATE x, 1
    PRINT x;
    NEXT
    WHILE INKEY$ = ""
    WEND



    Pappy
    You learn something everyday.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories