![]() |
END. fehlt am Modulende
Hallo, ich versuche etwas zu drucken, mit Delphi 3.
Ich bekomme nun immer die Fehlermeldung "END. fehlt am Modulende" Natürlich ist da ein END. und ich habe auch den Code lokalisieren können, der den Fehler verursacht, ich kann mir aber nicht erklären, woran es liegt. Wenn ich die beiden markierten Bedingungen "if LKPunkte....." entferne, bekomme ich keine Fehlermeldung mehr. Woran liegt es??? Ich hoffe, hier kann mir jemand helfen. Schon mal vielen Dank. torf160
Delphi-Quellcode:
procedure TForm1.drucken1Click(Sender: TObject);
var i : integer; ORand : integer; s : string; begin if PrintDialog1.Execute then begin Printer.BeginDoc; SetMapMode(Printer.Canvas.Handle, MM_LOMETRIC); //Umstellen auf 1/10 mm ORand := -400; with printer.Canvas do begin Font.Name:='Arial Narrow'; Font.Color:= clBlack; // Schriftfarbe Schwarz Brush.Color:=clWhite; // Hintergrundfarbe Weiß Font.Style:=[]; // Schriftstil = ohne Font.Height:=40; // Schrifthöhe = 2 mm For i := 1 to Anzahl do begin if LK[i].vereinbart then begin TextOut(200, ORand, LK[i].Nr); TextOut(300, ORand, Form1.LK[i].Bezeichnung); TextOut(940, ORand, 'Mo-Fr'); if LK[i].Taeglich_MoFr > 0 then begin s := IntToStr(LK[i].Taeglich_MoFr) + ' x tägl.'; TextOut(1160 - TextWidth(s), ORand, s); s := IntToStr(LK[i].Monatlich_MoFr) + ' x mtl.'; TextOut(1290 - TextWidth(s), ORand, s); {-------------------------------------------------------------------------} if LKPunkte then begin s := format('%n', [LK[i].Punkte_MoFr]); TextOut (1500 - TextWidth(s), ORand, s); s := format('%n', [LK[i].Punkte_Summe_MoFr]); TextOut (1700 - TextWidth(s), ORand, s) else begin s := format('%n', [LK[i].Preis_MoFr]); TextOut (1500 - TextWidth(s), ORand, s); s := format('%n', [LK[i].Preis_Summe_MoFr]); TextOut (1700 - TextWidth(s), ORand, s); end; // if LKPunkte {-------------------------------------------------------------------------} end; // if LK[i].Taeglich_MoFr TextOut(300, ORand - 40, Form1.LK[i].Bemerkung); TextOut(940, ORand - 40, 'Sa-So'); if LK[i].Taeglich_SaSo > 0 then begin s := IntToStr(LK[i].Taeglich_SaSo) + ' x tägl.'; TextOut(1160 - TextWidth(s), ORand - 40, s); s := IntToStr(LK[i].Monatlich_SaSo) + ' x mtl.'; TextOut(1290 - TextWidth(s), ORand - 40, s); {-------------------------------------------------------------------------} if LKPunkte then begin s := format('%n', [LK[i].Punkte_SaSo]); TextOut (1500 - TextWidth(s), ORand - 40, s); s := format('%n', [LK[i].Punkte_Summe_SaSo]); TextOut (1700 - TextWidth(s), ORand - 40, s) else begin s := format('%n', [LK[i].Preis_SaSo]); TextOut (1500 - TextWidth(s), ORand - 40, s); s := format('%n', [LK[i].Preis_Summe_SaSo]); TextOut (1700 - TextWidth(s), ORand - 40, s); end; // if LKPunkte {-------------------------------------------------------------------------} end; // if LK[i].Taeglich_SaSo ORand := ORand - 100; end; // if LK[i].vereinbart end; // For i := 1 to Anzahl end; // with printer.Canvas do Printer.enddoc; end; // if PrintDialog1.Execute end; |
Re: END. fehlt am Modulende
Delphi-Quellcode:
if LKPunkte then
begin s := format('%n', [LK[i].Punkte_MoFr]); TextOut (1500 - TextWidth(s), ORand, s); s := format('%n', [LK[i].Punkte_Summe_MoFr]); TextOut (1700 - TextWidth(s), ORand, s); end // fehlt das nicht? bei einem else ohne if sollte der compiler auch schon ein wenig früher aussteigen als beim "END."... else begin s := format('%n', [LK[i].Preis_MoFr]); TextOut (1500 - TextWidth(s), ORand, s); s := format('%n', [LK[i].Preis_Summe_MoFr]); TextOut (1700 - TextWidth(s), ORand, s); end; // if LKPunkte |
Re: END. fehlt am Modulende
so etwas hier gibt es in delphi nicht:
Delphi-Quellcode:
zu jedem beginn gehört auch ein end:
if LKPunkte then
begin // else begin // end;
Delphi-Quellcode:
if irgendwas then
begin // end else begin // end; |
Re: END. fehlt am Modulende
Es fehlt ein ein end
Delphi-Quellcode:
TextOut (1700 - TextWidth(s), ORand, s);
end else |
Re: END. fehlt am Modulende
:-D
Toll, nun funktioniert es! Vielen Dank, für die schnelle Hilfe. torf160 |
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:16 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz