Autor Beitrag
Tabakbrummel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 124

win 7
Turbo Delphi, VS 20010 Express
BeitragVerfasst: Sa 12.08.06 18:28 
Hallo

Bei meiner procedure kommt die Fehlermeldung: Inkompatible Typen: 'string' und 'Extended'.
Hier ist mal mein Code.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.LaengenGradberechnung;
var
  L : string;
begin
  L := Pi * Edit1.Text / 180; <---- Hier liegt der fehler
  DBEdit1.Text := (L);
end;

Was mache ich hier falsch?

_________________
MfG
Tabakbrummel
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Sa 12.08.06 18:39 
ausblenden Delphi-Quelltext
1:
L:= FloatToStr(Pi * Edit1.Text / 180);					
Tabakbrummel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 124

win 7
Turbo Delphi, VS 20010 Express
BeitragVerfasst: Sa 12.08.06 18:42 
Hallo Ironwulf

Es kommt die gleich Fehlermeldung.

_________________
MfG
Tabakbrummel
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Sa 12.08.06 18:44 
ahjo sry hab was übersehn so müssts aussehn:
ausblenden Delphi-Quelltext
1:
L:= FloatToStr(Pi * StrToInt(Edit1.Text) / 180);					
Tabakbrummel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 124

win 7
Turbo Delphi, VS 20010 Express
BeitragVerfasst: Sa 12.08.06 18:46 
Hallo Ironwulf

Vielen vielen besten Dank.

_________________
MfG
Tabakbrummel
Jakob Schöttl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 929
Erhaltene Danke: 1


Delphi 7 Professional
BeitragVerfasst: Sa 12.08.06 19:52 
Bloß, dass es dir klarer wird:
Es kann nicht gehen, dass du bei Pascal einfach einen String einem Zahlentyp oder umgekehrt zuweist! Bei Basic geht das glaub ich, dafür ist es bei Pascal aber sicherer.