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

Username:   Password: 
 RegisterRegister   
 Clearing text from if statements at the end of a loop?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
user23




PostPosted: Sun Jan 30, 2011 12:39 pm   Post subject: Clearing text from if statements at the end of a loop?

What is it you are trying to achieve?
Trying to clear texts as the result of an if statement once the end of a loop is reached


What is the problem you are having?
The text that comes up as a result of my if statement doesn't go away when the next loop begins, but only when another set of text from another loop replaces it

Describe what you have tried to solve this problem
<Answer Here>


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)

Turing:


loop
    locate (x, y)
    put "statement:"
    locate (x, y) %(different from above, one line below)
    get var1
    exit when var1 %(conditions here)
    if var1 %(new conditions here) then
        put "new statement"
    end if
end loop



So yea basically, once we reach the end loop and it moves on to the next one (which is very similar except a new variable), I would like the "new statement" line to be removed, before it goes on to the new question which I didn't put above.
Sponsor
Sponsor
Sponsor
sponsor
huskiesgoaler34




PostPosted: Sat Feb 05, 2011 9:00 pm   Post subject: Re: Clearing text from if statements at the end of a loop?

I understand what you are trying to do but what is your program supposed to do. What are the values for the variables and there are no conditions in your if statement.
Now, to clear the text at the end of the loop, just add cls (pre defined function that clears the screen). Because you have no text put onto the screen outside your loop, then cls will work perfectly.
Raknarg




PostPosted: Thu Feb 17, 2011 8:32 pm   Post subject: RE:Clearing text from if statements at the end of a loop?

I would just use cls.

put "new statement"
delay(1000)
cls

it'll stay up for 1 second, then it'll wip everything off.
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: