procedure ClearScreen; //清屏<br>var sbi: TConsoleScreenBufferInfo;<br> h: hwnd;<br> Cord: _COORD;<br> R: Cardinal;<br>begin<br> h := GetStdHandle(STD_OUTPUT_HANDLE);<br> GetConsoleScreenBufferInfo(h, sbi);<br> Cord.X := 0;<br> Cord.Y := 0;<br> FillConsoleOutputCharacter(h, ' ', sbi.dwSize.X * sbi.dwSize.Y, Cord, R);<br> SetConsoleCursorPosition(h, Cord);<br>end;<br><br>begin<br> writeln('Press Enter to Clear then Screen');<br> writeln('Press Enter to Clear then Screen');<br> writeln('Press Enter to Clear then Screen');<br> writeln('Press Enter to Clear then Screen');<br> writeln('Press Enter to Clear then Screen');<br> Readln;<br> //ClearConsoleScreen;<br> ClearScreen;<br> writeln('ffffffffffffffff');<br> Readln;<br>end.