New Thread, disregard last question - Programmers Heaven

Howdy, Stranger!

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


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

New Thread, disregard last question

Garrett85Garrett85 Posts: 168Member
; Closes program after player presses ESC.
Graphics 640, 480

Text 0, 0, "Why did you open this program?"

;y is the variable that judges the location of the text
y = 12

;print text
Text 0, y, "Press Esc to exit."
;wait a sec
Delay 1000

;move next line of text down
y = y + 12

;repeat until user hits esc
Until KeyHit(1)
Text 0, y, "Program is ending."

In the above program, what causes the text to move down, I don't see it. I understand that the "12" is 12 pixels, but what's making it go down, I can't seem to find it? Thank.


  • anthrax11anthrax11 Posts: 511Member
    ;move next line of text down
    y = y + 12

    The text itself doesn't move down, but the next text is printed 12 pixels below where the first text was printed.
Sign In or Register to comment.