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

Username:   Password: 
 RegisterRegister   
 how to use locate properly?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
yingmu




PostPosted: Fri Mar 04, 2005 8:41 pm   Post subject: how to use locate properly?

i'm working on a project and i'm put text on a certain part of the screen, i tried using locate and locatexy but only the first line is on the right spot, the rest start below the first line but starts at the left hand side of the screen...
is taht suppose to happen, if not please help me. thanx
Sponsor
Sponsor
Sponsor
sponsor
person




PostPosted: Fri Mar 04, 2005 9:18 pm   Post subject: (No subject)

ok...this is how locate works

locate (x,y)

x is the row number
y is the column number

and wat comes after the locate is put there
mwachna




PostPosted: Fri Mar 04, 2005 9:23 pm   Post subject: (No subject)

when you use locate (row, col) it will only apply to the very next output. after that the output will follow to the next line. so if the first output is located to (row,col) then the next ouput will start at (row +1, 1)

Quote:

_____________So if you started here:
the next line is here
then here


if you want this:
Quote:

Text here
Then text here
All lined up!


you need to have this code:

code:

locate (row, col)
put "Text here"
locate (row+1, col)
put "Then text here"
locate (row+2, col)
"All lined up!"
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: