Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

gotoxy

Status
Not open for further replies.

TedsHorse

Technical User
Joined
Oct 30, 2002
Messages
1
Location
US
Can someone explain how gotoxy works. I'm still confuse with x and the y input. I'm using an array [1..3,1..5]
I enter 5 things for 3 different people. I still can't figure out how to write them properly to make it neat.
I just need an explanation of how gotoxyworks since the index doesnt help much.
 
Declaration: (Crt unit)

procedure Gotoxy(X, Y: Integer);

Use Gotoxy procedure to move to (X,Y) coordinates in text mode.

Your monitor has (usually in text mode) 80 columns x 25 lines. Each character is printed in one of the 80x25=2000
character-thesis. The left-up corner is the coordinate pair (1,1) and the bottom right is (80, 25) cause X is the columns counter.

(view comments):

Code:
uses 
  crt;

begin
  ClrScr; {screen clears and cursor goes at (1,1)}
  Write('A'); {writes A at (1,1)}
  Gotoxy(20, 15); {goes at columns 20 and line 15}
  Write('A'); Writes A at (20,15)
end.
 
Better use the tabulation symbol (#8 in ASCII if I' not mistaken) it arranges words into columns automatically

Zum Beispiel: (ÝÐßàØÜÕà, âãßÞÙ âë ïÝÚØ) (for example)
for i:=1 to 3 do
writeln("N Surname",#8,"1st thing",#8, and so on);

 
Yes, the tab key is ascii 8...

what is...
Zum Beispiel: (ÝÐßàØÜÕà, âãßÞÙ âë ïÝÚØ)
???

(just curious) Sometimes... the BASIC things in life are the best...
cheers.gif

or at least the most fun ;-)
-Josh Stribling
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top