Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How clear put "blank" in a loop?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
baller95




PostPosted: Fri Jun 17, 2011 7:33 pm   Post subject: How clear put "blank" in a loop?

--------
loop
put "Blank:" num ..

delay (1000)
--------------

wut do i do after? I want it to clear the result of num but then show up after the delay.
Pretend num is score. How would i erase the score each time after the delay to put in a new score w/o using cls?
Sponsor
Sponsor
Sponsor
sponsor
RandomLetters




PostPosted: Fri Jun 17, 2011 8:08 pm   Post subject: RE:How clear put "blank" in a loop?

You use cls, and you rewrite everything else.

Alternatively, use graphics, erase that area of the screen, and redraw the new score.

Simple text is not enough because the output to the screen is really a stream or continous line of text, and it's impossible to actually insert new text into the middle.
crossley7




PostPosted: Sat Jun 18, 2011 3:18 pm   Post subject: RE:How clear put "blank" in a loop?

you could use the locate command if you know what spot on your screen that you are writing to.

for example
locate (1,1)
put "abcdef"
locate (1,1)
put "123"..

that would output
123def
but only if you remember to place the .. at the end of the second put statement, if you don't remember that, then anything on the screen for the rest of the line goes blank.

the idea is that you overwrite the characters that are currently on the screen with new text
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: