Autor Beitrag
Biarchiv
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 688



BeitragVerfasst: Mo 05.05.03 15:15 
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure ConcatFiles(DestFilename: string; const Filenames: array of string); 
var 
  i: Integer; 
  InStream, OutStream: TFileStream; 
  FirstSize, Size: Integer; 
begin 
  if Length(Filenames) = 0 then Exit; // Funktioniert nicht bei Delphi3


if Length(Filenames) = 0 then Exit; Geht leider bei Delphi3 nicht. Kann
man das irrgendwie umschreiben?

Danke

Moderiert von user profile iconKlabautermann: Code-Tags hinzugefügt.
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Mo 05.05.03 15:26 
Hallo,

erkläre bitte mal, was du mit der Problematischen Zeile ereichen willst.

Gruß
Klabautermann
Biarchiv Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 688



BeitragVerfasst: Mo 05.05.03 15:34 
Hallo,

Danke für Deine Antwort.
ausblenden Quelltext
1:
ConcatFiles(save, [datei1.txt, datei2.txt, datei3.txt, datei4.txt, datei5.txt,..]					

Nun muß ich aber für jede Datei extra einen Aufruf machen da wenn es eine Datei nicht gibt kommt es zum Error.
ausblenden Quelltext
1:
2:
3:
ConcatFiles(save, [datei1.txt, datei2.txt]
ConcatFiles(save, [datei1.txt, datei2.txt, datei3.txt]
ConcatFiles(save, [datei1.txt, datei2.txt, datei3.txt, datei4.txt]

Diesr Befehl bewirft das er fals eine Datei nicht mehr gibt das die proc
beendet wird.

Moderiert von user profile iconTino: Code-Tags eingefügt.
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mo 05.05.03 15:41 
Soweit ich weiß, unterstützt Delphi 3 doch gar keine dynamischen Arrays, oder? Kannst Du dann den Parameter so überhaupt verwenden?

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Biarchiv Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 688



BeitragVerfasst: Mo 05.05.03 16:39 
Hallo,

Doch läuft super. Delphi3.02 Standard

Nur das kennt er nicht.
Alni
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 205

Win 2000, XP, SuSe, Debian
D5 Prof, D7 Prof, Kylix
BeitragVerfasst: Mo 05.05.03 18:49 
Versuch doch mal einfach auf das erste Eelment im Array zu zugreifen, und fang die Exception ab die Auftritt wenn das Element nicht vorhanden ist. In der Behandlung der Exception kannst du dann auch die Proc verlassen.