2
0

ConsoleOut.pas 994 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. program ConsoleOut;
  2. {$IFDEF MSWINDOWS}
  3. {$APPTYPE CONSOLE}
  4. {$ENDIF}
  5. {$MODE DELPHI}
  6. {$R *.res}
  7. uses
  8. SysUtils,
  9. Quick.Commons,
  10. Quick.Console;
  11. var
  12. coord : TCoord;
  13. x : Integer;
  14. y : Integer;
  15. begin
  16. {$IFDEF MSWINDOWS}
  17. Application.Title:='ConsoleDemo';
  18. {$ENDIF}
  19. try
  20. Console.LogVerbose := LOG_DEBUG;
  21. //x := 10;
  22. //y := 10;
  23. //coord.x := x;
  24. //coord.y := y;
  25. //SetCursorPos(coord);
  26. writeln('Console Out Example');
  27. coutxy(1,1,'hola',etinfo);
  28. readln;
  29. coutXY(10,10,'this line will be replaced by the next',etInfo);
  30. coutXY(10,10,'this line replaces previous',etSuccess);
  31. cout('Normal line 1',etInfo);
  32. coutBL('bottom line: 1',etInfo);
  33. cout('Normal line 2',etDebug);
  34. coutXY(10,5,'I''m here',etSuccess);
  35. cout('Normal line 3',etSuccess);
  36. coutBL('bottom line: 2',etInfo);
  37. coutBL('bottom line: 3',etInfo);
  38. ConsoleWaitForEnterKey;
  39. except
  40. on E: Exception do
  41. Writeln(E.ClassName, ': ', E.Message);
  42. end;
  43. end.