Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 1675
Number of posts: 4764

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
New Thread, disregard last question Posted by Garrett85 on 3 Mar 2009 at 10:13 AM
; Closes program after player presses ESC.
Graphics 640, 480

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

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

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

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

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

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.
Report
Re: New Thread, disregard last question Posted by anthrax11 on 3 Mar 2009 at 10:40 AM
;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.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.