자꾸 글올려서 죄송합니다.
EXPECTED '=' but '('found
이게 무슨 error져???
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
procedure Edit2Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
var
minusMunce : integer;
minusMunce := strtoint(edit1.text);
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if key=#13 then
begin
if Edit1.Text = '1' then
Edit1.Text := FormatDateTime( 'YYYY.MM', IncMonth(Now,-2) )
+ ' ~ ' + FormatDateTime( 'YYYY.MM', IncMonth(Now,-1) );
end;
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if Edit.Text = '2' then
Edit.Text := FormatDateTime( 'YYYY.MM', IncMonth(Now,-4) )
+ ' ~ ' + FormatDateTime( 'YYYY.MM', IncMonth(Now,-3) );
end;
end.
keypress시.....
if key=#13 then begin//만일 엔터키를 눌렀다면.....
Edit2.Text := FormatDateTime( 'YYYY.MM', IncMonth(Now,-(strtoint(edit1.text)+1) )
+ ' ~ ' + FormatDateTime( 'YYYY.MM', IncMonth(Now,-(strtoint(edit1.text)) );
Edit2.Text := FormatDateTime( 'YYYY.MM', IncMonth(Now,-(strtoint(edit1.text)+1) )*)
+ ' ~ ' + FormatDateTime( 'YYYY.MM', IncMonth(Now,-(strtoint(edit1.text))*) );
mickyblue wrote:
> 자꾸 글올려서 죄송합니다.
> EXPECTED '=' but '('found
> 이게 무슨 error져???
>
>
> unit Unit1;
>
> interface
>
> uses
> Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
> StdCtrls;
>
> type
> TForm1 = class(TForm)
> Edit1: TEdit;
> Edit2: TEdit;
> procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
> procedure Edit2Change(Sender: TObject);
>
> private
> { Private declarations }
> public
> { Public declarations }
> end;
>
> var
> Form1: TForm1;
>
> implementation
>
> {$R *.DFM}
>
> var
> minusMunce : integer;
>
> minusMunce := strtoint(edit1.text);
>
> procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
>
> begin
> if key=#13 then
>
> begin
> if Edit1.Text = '1' then
> Edit1.Text := FormatDateTime( 'YYYY.MM', IncMonth(Now,-2) )
> + ' ~ ' + FormatDateTime( 'YYYY.MM', IncMonth(Now,-1) );
>
> end;
>
> procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
>
> begin
> if Edit.Text = '2' then
> Edit.Text := FormatDateTime( 'YYYY.MM', IncMonth(Now,-4) )
> + ' ~ ' + FormatDateTime( 'YYYY.MM', IncMonth(Now,-3) );
> end;
>
> end.
>
> keypress시.....
> if key=#13 then begin//만일 엔터키를 눌렀다면.....
> Edit2.Text := FormatDateTime( 'YYYY.MM', IncMonth(Now,-(strtoint(edit1.text)+1) )
> + ' ~ ' + FormatDateTime( 'YYYY.MM', IncMonth(Now,-(strtoint(edit1.text)) );
>
>
>
>
>