Moin,
intern brauchst du zwei Prozeduren, nach aussen sieht es dann aber so aus, als ob du nur eine Prozedur hast...
Delphi-Quellcode:
type
TFFTData512 = array[0..512] of Double;
TFFTData1024 = array[0..1024] of Double;
TFFTData2048 = array[0..2048] of Double;
TFFTData4096 = array[0..4096] of Double;
TWaveData512 = array[0..512] of SmallInt;
TWaveData1024 = array[0..1024] of SmallInt;
TWaveData2048 = array[0..2048] of SmallInt;
TWaveData4096 = array[0..4096] of SmallInt;
:
:
private
procedure getData(data:array of double); overload;
procedure getData(data:array of SmallInt); overload;
public
:
:
procedure TForm.getData(data:array of double);
begin
case sizeof(data) of
sizeof(TFFTData512): showmessage('TFFTData512');
sizeof(TFFTData1024): showmessage('TFFTData1024');
sizeof(TFFTData2048): showmessage('TFFTData2048');
sizeof(TFFTData4096): showmessage('TFFTData4096');
end;
end;
procedure TForm.getData(data: array of SmallInt);
begin
case sizeof(data) of
sizeof(TWaveData512): showmessage('TWaveData512');
sizeof(TWaveData1024): showmessage('TWaveData1024');
sizeof(TWaveData2048): showmessage('TWaveData2048');
sizeof(TWaveData4096): showmessage('TWaveData4096');
end;
end;
und der Aufruf...
Delphi-Quellcode:
procedure TForm.ButtonClick(Sender: TObject);
var a1:TFFTData512;
b1:TFFTData1024;
c1:TFFTData2048;
d1:TFFTData4096;
a2:TWaveData512;
b2:TWaveData1024;
c2:TWaveData2048;
d2:TWaveData4096;
begin
getData(a1);
getData(b1);
getData(c1);
getData(d1);
getData(a2);
getData(b2);
getData(c2);
getData(d2);
end;
vielleicht hilft es dir ja...
MfG
Thorsten