Autor Beitrag
Mitmischer 1703
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 754
Erhaltene Danke: 19

Win 7, Debian
Delphi Prism, Delphi 7, RAD Studio 2009 Academic, C#, C++, Java, HTML, PHP
BeitragVerfasst: Do 08.10.09 17:48 
Hi DF!
Wieso brauch ich bei nachfolgendem Code 2mal end am ende?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
procedure TMainForm.FormCreate(Sender: TObject);
var F : File;
begin
  try
   {$REGION 'Initialisierung'}
   if not FileExists(OptionsIni) then
   begin
    Assignfile(F, OptionsIni);
    Rewrite(F);
    CreateEmptyIniFile;
    FOptionInfo.Normalize; // FOPtioninfo mit den norm. Werten initailisieren
   end
   else
    ReadIni;
   NILFormVars;
   ResetLanguage;
   randomize;
   MenuWordWrap.Checked := Input.WordWrap;
   {$ENDREGION}
   //  combobox (OKCANCL2) füllen     8
   //  mit modalresult arbeiten (OKCANCL2)
   //  Max-Wert auslesen für spinedit    {$ENDREGION}
  except on E :Exception do
  begin
   raise E;
   HaltApp('Initialisierung fehlgeschlagen!', InitFailed);
  end;
  end;

end;

_________________
Die Lösung ist nicht siebzehn.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8553
Erhaltene Danke: 479

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 08.10.09 17:53 
Das eine end gehört zum try:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
try
..
except
..
end

_________________
We are, we were and will not be.
Mitmischer 1703 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 754
Erhaltene Danke: 19

Win 7, Debian
Delphi Prism, Delphi 7, RAD Studio 2009 Academic, C#, C++, Java, HTML, PHP
BeitragVerfasst: Do 08.10.09 17:55 
ah okay, ich hab immer gedacht das end gehört zum except :)

Danke :)

_________________
Die Lösung ist nicht siebzehn.