unit IfDirectiveForm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
const
DebugControl = 2;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage ('Executing critical code');
ShowMessage ('Bye');
ShowMessage ('Delphi6');
ShowMessage ('Older Delphi');
ShowMessage ('Windows 16');
MessageBox (0, 'Windows Platform', 'Message', MB_OK);
ShowMessage ('Win32');
ShowMessage ('Linux');
ShowMessage (FloatToStr (System.RTLVersion));
end;
var
WindowsVersion: Integer platform = 2000;
procedure Test; platform;
begin
Beep;
end;
type
TWinClass = class
x: Integer;
end library;
procedure TForm1.Button2Click(Sender: TObject);
begin
ShowMessage (
IncludeTrailingBackSlash (ExtractFilePath (Application.ExeName)));
Test;
ShowMessage (IntToStr (WindowsVersion));
TWinClass.Create;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
ShowMessage ('RTL 14.0 or above');
end;
end.
|