Computer Science Canada

HELP on Input Process! PLEASE READ!

Author:  d3c0d3d [ Tue Jan 13, 2004 5:43 pm ]
Post subject:  HELP on Input Process! PLEASE READ!

okay this is the situation...i ask the user someting...then i put 'get ANSWER'....my question is how do you over right the first line with your second question so that the first line will disappear and you can see the second line?...if u know what i mean please help...if not then give me hints...thanks a bunch people!

Author:  Tony [ Tue Jan 13, 2004 6:36 pm ]
Post subject: 

you can ether use cls to clear the screen and start from the top, or use locate(row,column) to locate output to a specific point.

Author:  DanShadow [ Tue Jan 13, 2004 7:40 pm ]
Post subject: 

Yeah, like this:
code:

var answer:string:=""
for i:1..2
locate(1,1)
if i=1 then
put "What color is the sky: "..
get answer
elsif i=2 then
put "Why do clouds rain: "..
get answer
end if
end for

The locate commands is really easy and useful for this. Or as tony says, cls works too. or if you want, you could combine them, to cls, and locate the text, Wink

Author:  d3c0d3d [ Tue Jan 13, 2004 7:45 pm ]
Post subject: 

yea but you can still see the first question thats on the background..anyone got any other ideas?

Author:  Andy [ Tue Jan 13, 2004 7:54 pm ]
Post subject: 

as tony said... cls to clear the screen


: