Код:
unit lab12;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Edit1: TEdit;
Edit2: TEdit;
DateTimePicker1: TDateTimePicker;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var ch,mes,god:word;
begin
DecodeDate(DataTimePicker1.Date, god, mes, ch);
if (ch>0) and (ch<32) and (mes>0) and (mes<13) then
case mes of
1:if ch>=20 then Label3.caption:=' Vodoley' else Label3.caption:=' Kozerog';
2:if ch>=20 then Label3.caption:=' Ryba' else Label3.caption:=' Vodoley';
3:if ch>=20 then Label3.caption:=' Owen' else Label3.caption:=' Ryba';
4:if ch>=20 then Label3.caption:=' Telec' else Label3.caption:=' Owen';
5:if ch>=20 then Label3.caption:=' Bliznechy' else Label3.caption:=' Telec';
6:if ch>=20 then Label3.caption:=' Rak' else Label3.caption:=' Bliznechy';
7:if ch>=20 then Label3.caption:=' Lev' else Label3.caption:=' Rak';
8:if ch>=20 then Label3.caption:=' Deva' else Label3.caption:=' Lev';
9:if ch>=20 then Label3.caption:=' Vesy' else Label3.caption:=' Deva';
10:if ch>=20 then Label3.caption:=' Skorpion' else Label3.caption:=' Vesy';
11:if ch>=20 then Label3.caption:=' Strelec' else Label3.caption:=' Skorpion';
12:if ch>=20 then Label3.caption:=' Kozerog' else Label3.caption:=' Strelec';
end
end.
пишет вот что:
[Error] lab12.pas(41): Undeclared identifier: 'DataTimePicker1'
[Error] lab12.pas(41): Not enough actual parameters
[Error] lab12.pas(42): ';' expected but 'IF' found
[Error] lab12.pas(57): '.' expected but 'END' found
Где я так серьезно напортачил? )