Is there a function for extended to string? I'm using sin and cos in a function which returns the variable as extended, but the I want to writeln what that variable is, so I need to convert it to a string somehow.
Is there a function for extended to string? I'm using sin and cos in a function which returns the variable as extended, but the I want to writeln what that variable is, so I need to convert it to a string somehow.
FloatToStr:
SCAR Code:program New;
var
MyVar : Extended;
begin
MyVar := 0.4;
WriteLn(FloatToStr(MyVar));
end.
Alright thanks. I found another way anyway I think
InttoStr(round(Myvar));
Yeah, but then you would write an int and not an extended anymore...
Administrator's Warning:
Yea, thats okay though. I don't actually need the decimal places that sin returns.
There are currently 1 users browsing this thread. (0 members and 1 guests)