Autor Beitrag
Yasso
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35



BeitragVerfasst: Mi 13.04.05 07:17 
Hallo,

ist es möglich an eine Funktion immer wieder andere Anzahl von Bytes als Parameter zu übergeben. z.B.
ausblenden Delphi-Quelltext
1:
2:
 x := add(x1,x2,x3);
 y := add(x1,x2,x3,x4,x5);

damit meine ich, dass die Parameteranzahl sich immer wieder ändern kann. Die maximale Anzahl ist 128 Bytes. Und wie kann ich dann in der Funktion die Anzahl der übergebenen Bytes ermitteln?

Ich habe hier 3 Delphi-Bücher, aber ich finde nichts darüber. Und beim googlen auch leider nichts!!

Kann jemand mir weiter helfen!!

Danke
Yasso

Moderiert von user profile iconTino: Delphi-Tags hinzugefügt.
Moderiert von user profile iconTino: Topic aus Sonstiges verschoben am Mi 13.04.2005 um 11:03

_________________
Yasso
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Mi 13.04.05 07:39 
Hallo

gugg mal in der OH zu "offene Array paramter".
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
function add(bytes:array of byte):integer;
  begin
    ...
  end;

...
y1:=add([x1,x2]);
y2:=add([x1,x2,x3,x4]);


Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
Yasso Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35



BeitragVerfasst: Do 14.04.05 04:48 
vielen Dank.
Es funktioniert.

Yasso

_________________
Yasso