Einzelnen Beitrag anzeigen

Gehstock

Registriert seit: 28. Jan 2006
Ort: Görlitz / Sachsen
489 Beiträge
 
Delphi 2007 Professional
 
#3

Re: c++ Variablen in Delphi

  Alt 25. Feb 2008, 16:36
bei einem typ hab ich ein problem

DWORD *table


Delphi-Quellcode:
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;
    }
}
hab ich zu übersetzt(Versuch)

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:
Array type Required
Marcel
  Mit Zitat antworten Zitat