home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / TPBASIC.ZIP / CLRLINE.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1985-02-26  |  1.3 KB  |  42 lines

  1. Procedure Clear_Line ( Line_Number : Integer ) ;
  2.  
  3.     (*
  4.         This procedure will erase the entire line specified
  5.         by "Line_Number".  The cursor position before the call
  6.         is not effected in any way.
  7.  
  8.         LINE_NUMBER must be in the range 1..25.  If it is not,
  9.         the procedure will return without clearing any line.
  10.  
  11.         This procedure was written by Paul D. Guest and released
  12.         to the Public Domain by same without restrictions on use,
  13.         and with no monetary return expected or desired.  Please
  14.         direct comments or questions to the author via "The Indy
  15.         Connection" RBBS @ (317) 846-8675 (24 hrs,7 days/week --
  16.         Paul & Greg McLear, sysops).
  17.         (Enjoy! - pdg 2/85)
  18.  
  19.     *)
  20.  
  21. Var
  22.     OldX : 1 .. 80 ;
  23.     OldY : 1 .. 25 ;
  24.  
  25. Begin (* Procedure Clear_Line *)
  26.  
  27.     If Line_Number IN [ 1 .. 25 ] Then
  28.             (* Valid line number, so continue *)
  29.         Begin
  30.  
  31.         OldX := WhereX ;
  32.         OldY := WhereY ;
  33.  
  34.         GotoXY ( 1 , Line_Number ) ;
  35.         ClrEOL ;
  36.  
  37.         GotoXY ( OldX , OldY )
  38.  
  39.         End (* If Line_Number IN [1..25] *)
  40.  
  41. End (* Procedure Clear_Line *) ;
  42.