Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#1

Konvertierungs problem C nach Delphi

  Alt 14. Mär 2007, 21:30
habe ein kleines konvertierungs problem von c nach Delphi


Code:
h+=specdata[i*8+j+c*576];
h ist single original(float)
habe es so übersetzt!
h+ This_Mod^.Spectrumdata[i * 8 + j + c * 576]; Fehler.
[Pascal Error] VisCDRom.pas(423): E2008 Incompatible types


Code:
h/=(1.0f*255.0f);
habe es so übersetzt!
h/ (1.0 * 255.0); Fehler.
[Pascal Error] VisCDRom.pas(424): E2014 Statement expected, but expression of type 'Extended' found

Habe gelesen das 'h/' auch in Delphi verwendet wird genauso wie 'h+'
Zitat:
/ (slash) Similar. Object Pascal always returns a floating point result.
+ (plus) OK. Also used for string concatenation and set union.
ob das nun im zusammenhang mit h/ und h+ steht .. keine ahnung.

Scheint aber nicht zusammen zu passen.

gruss Emil
  Mit Zitat antworten Zitat