nie mogę rozwiązać pewnego problemu ???
chodzi o else;
błąd jest oznaczony pogrubioną kursywą
unit introder;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons;
type
TForm1 = class(TForm)
Memo2: TMemo;
GroupBox1: TGroupBox;
Button2: TButton;
Button1: TButton;
Memo1: TMemo;
BitBtn1: TBitBtn;
Button3: TButton;
Button4: TButton;
Button5: TButton;
procedure FormCreate(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
VAR
TF : TextFile;
r, m, d :word;
mi :string;
begin
DecodeDate(date, r, m, d);
if m=9 then
mi:='WRZESIEŃ ';
if m=10 then
mi:='PAŹDZIERNIK ';
if m=11 then
mi:='LISTOPAD ';
if m=12 then
mi:='GRUDŹIEŃ ';
if m=1 then
mi:='STYCZEŃ ';
if m=2 then
mi:='LUTY ';
if m=3 then
mi:='MARZEC ';
if m=4 then
mi:='KWIECIEŃ ';
if m=5 then
mi:='MAJ ';
if m=6 then
mi:='CZERWIEC ';
if m=7 then
mi:='LIPIEC ';
if m=8 then
mi:='SIERPIEŃ ';
if fileexists (ExtractFilePath( Application.ExeName ) + mi + Format('%d',[R]) + '.txt') then showmessage('Plik dziennika istnieje.')
else AssignFile(TF, ExtractFilePath( Application.ExeName ) + mi + Format(' %d',[R]) + '.txt' ); * przypisanie pliku do zmiennej }
Rewrite(TF); * utworzenie pliku
try
finally
CloseFile(TF);
end;
memo2.Lines.LoadFromFile(( ExtractFilePath( Application.ExeName ) + mi + format ('%d',[r]) + '.txt'));
end;
procedure TForm1.Button4Click(Sender: TObject);
{ Jak ZDEKODOWAĆ datę ? }
var
r, m, d :word;
mi :string;
begin
DecodeDate(date, r, m, d);
if m=9 then
mi:='WRZEŚNIA ';
if m=10 then
mi:='PAŹDZIERNIKA ';
if m=11 then
mi:='LISTOPADA ';
if m=12 then
mi:='GRUDNIA ';
if m=1 then
mi:='STYCZNIA ';
if m=2 then
mi:='LUTEGO ';
if m=3 then
mi:='MARCA ';
if m=4 then
mi:='KWIETNIA ';
if m=5 then
mi:='MAJA ';
if m=6 then
mi:='CZERWCA ';
if m=7 then
mi:='LIPCA ';
if m=8 then
mi:='SIERPNIA ';
memo1.lines.add( Format(' %d ' ,[D]) + mi + Format('%d ',[r]));
end;
end.
Proszę pomóżcie :(
--Delphi 2 , 6 i 5
Ciekawe pomysły i poszukiwanie rozwiązań.