I never know what is the reason of where and why I should put uses clause place.
unit Unit2;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs; // why put on top ?
type
TForm2 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
uses System.Math, System.IOUtils, System.WideStrUtils; // why put here ?
procedure TForm2.FormCreate(Sender: TObject);
begin
//
end;
end.
Also, what is the first priority of uses unit does? Why winapi.windows always on first place, what happens if not in first place?