![]() |
c++ Variablen in Delphi
gesucht werden
byte* buf_ptr, DWORD& list, ^byte und DWORD *table, unsigned char *buffer, |
Re: c++ Variablen in Delphi
byte* buf_ptr -> buf_ptr: PByte
DWORD& list -> var list: Cardinal ^byte -> sagt mir leider nix ;) DWORD *table -> table: PCardinal unsigned char *buffer -> gibts so direkt nicht, am ehesten buffer: PChar |
Re: c++ Variablen in Delphi
bei einem typ hab ich ein problem
DWORD *table
Delphi-Quellcode:
hab ich zu übersetzt(Versuch)
void CAMSSAnalyzerDlg::make_crc30_table(DWORD *table)
{ DWORD c; int n, k; for (n = 0; n < 256; n++) { c = n; c <<= (30-8); for (k = 0; k < 8; k++) { if ((c & 1<<(30-1)) != 0) { c = CRC_30_POLYNOMIAL ^ (c << 1); } else { c <<= 1; } } table[n] = c; } }
Delphi-Quellcode:
Procedure make_crc30_table(table: PCardinal);
var c : DWord; n,k : Integer; begin for n := 0 to 255 do begin c := n; c := c shl (30-8); for k := 0 to 7 do begin if not((c and 1 shl (30-1)) = 0) then c := CRC_30_POLYNOMIAL xor (c shl 1) else c := c shl 1; end; table[n] := c; //Fehler end; end; Zitat:
|
Re: c++ Variablen in Delphi
Jop, DWORD *table lässt sich mit table: PCardinal oder table: array of Cardinal übersetzen.
|
Re: c++ Variablen in Delphi
Danke so gibt es keine Fehler ist die Übersetzung soweit richtig?
|
Re: c++ Variablen in Delphi
Delphi-Quellcode:
sollte besser ein
if not((c and 1 shl (30-1)) = 0) then
Delphi-Quellcode:
sein...
if (c and (1 shl (30-1)) <> 0 then
edit: ups, verklammert |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:43 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