Re: converting between extended and string types?


[ Related Articles and Replies ] [ DelphiLand FAQ ] [ Delphi Tutorials ]

Posted by WAllison :

In Reply to: Re: converting between extended and string types? posted by Rbrrneck

: : I wish to display the result of a sum (which is an extended data type) in a label but the debugger says string and extended are incompatible data types - how can I make the extended into a string?

: : Any help much appreciated!

: : Jimbo :)

: Try putting label1.caption:=string(the sum) or
: label1.caption:=inttostr(the sum)

Try using String_var := FloatToStr(The sum, ffGeneral);

- well something like that - floattostr/floattostrf are the best ways to convert extented/real data types...



DelphiLand FAQ Delphi Tutorials