Advertisement
D98rolb

Untitled

Sep 26th, 2024
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.57 KB | Software | 0 0
  1. program test;
  2. 
  3. {$APPTYPE CONSOLE}
  4.  
  5. {$R *.res}
  6.  
  7. uses
  8.   System.Classes,
  9.   System.SysUtils;
  10.  
  11.   procedure WasteSomeTime;
  12.   begin
  13.     var Strings := TStringList.Create;
  14.     try
  15.  
  16.       for var i := 1 to 100000 do
  17.         Strings.Add(i.ToString);
  18.  
  19.       Strings.Sort;
  20.  
  21.     finally
  22.       Strings.Free;
  23.     end;
  24.   end;
  25. 
  26. begin
  27.   try
  28.  
  29.     for var i := 1 to 10 do
  30.     begin
  31.       Writeln(i.ToString);
  32.       WasteSomeTime;
  33.     end;
  34.  
  35.   except
  36.     on E: Exception do
  37.       Writeln(E.ClassName, ': ', E.Message);
  38.   end;
  39. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement