Beispiel:
Code: Alles auswählen
x:= StrToFloat(Edit1.Text);
Code: Alles auswählen
"f" is an invalid float.
Press OK to ignore and risk data corruption.
Press Cancel to kill the program.
Code: Alles auswählen
x:= StrToFloat(Edit1.Text);
Code: Alles auswählen
"f" is an invalid float.
Press OK to ignore and risk data corruption.
Press Cancel to kill the program.
Code: Alles auswählen
if TryStrToFloat(Edit1.text,x) then Caption:=FloatToStr(x);