/debugger/test/examples/testcntr.pp

http://github.com/graemeg/lazarus · Puppet · 30 lines · 29 code · 1 blank · 0 comment · 2 complexity · fe3145343623ed1c8a5dc14f816ca5cc MD5 · raw file

  1. program testcntr;
  2. {$mode objfpc}{$H+}
  3. uses
  4. TestWait,
  5. SysUtils;
  6. var
  7. m, n, x : Cardinal;
  8. w: TWait;
  9. S: String;
  10. begin
  11. m :=0;
  12. x := 0;
  13. w := TWait.Create(2);
  14. while x < 3 do
  15. begin
  16. repeat
  17. S := Format('[%.10d] ', [m]);
  18. Write(S);
  19. Inc(m);
  20. for n := 0 to 79 do
  21. begin
  22. Write('*');
  23. end;
  24. WriteLN;
  25. until m mod 10 = 0;
  26. W.Wait(10);
  27. inc(x);
  28. end;
  29. end.