Quoting David Emerson <[EMAIL PROTECTED]>: > Is there a function to query the terminal width and height, as a number of > characters?
If you "use CRT", you can make use of gotoxy() and WhereX plus WhereY to find out. Below is a unit I sometimes use for this purpose. Hope this helps, Unit UWinSize; { This unit determines the size of a text window. Just include it, and the variables will be set automatically. } Interface Uses CRT; Var ScreenMaxX, ScreenMaxY : Integer; Procedure SetScreenMax; Implementation Var Current, Increment : Integer; Function Biggest(UseX : Boolean) : Integer; Var Done : Boolean; Begin Repeat If UseX Then Begin GotoXY(Current,1); Done:= Current <> WhereX; End Else Begin GotoXY(1,Current); Done:= Current <> WhereY; End; If Not Done Then Current := Current + Increment; Until Done; Biggest := Current - Increment; End; Procedure SetScreenMax; Begin Current := 10; Increment := 10; Current := Biggest(True); Increment := 1; ScreenMaxX := Biggest(True); Current := 10; Increment := 10; Current := Biggest(False); Increment := 1; ScreenMaxY := Biggest(False); End; Var StartingX, StartingY : Integer; Begin StartingX := WhereX; StartingY := WhereY; SetScreenMax; GotoXY(StartingX,StartingY); End. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal