unit SystemOdd;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: SystemOdd
// Routine: System.Odd

// BeginCode
{
This example requires a text edit and a button with some clear
canvas in the top left ocrner of the form.  Enter the number to be
tested in the text edit and click to button to test if the entry
is odd.
}
procedure TForm1.Button1Click(Sender: TObject);
begin
   Canvas.TextOut(10, 10, '                                          ');
   if Odd(StrToInt(Edit1.Text)) then
     Canvas.TextOut(10, 10, Edit1.Text + ' is odd.')
   else
     Canvas.TextOut(10, 10, Edit1.Text + ' is even.');
end;
// EndCode
// EndExample: SystemOdd
end.
