How can i convert pascal string to double?
1 Answer
Like this:
Val(YourString, YourDouble, ErrorCode);
ErrorCode (which is Integer) is needed to know if the conversion was successful.
Hope it helps :)
4 Comments
itsols
Did you understand my example?
Marco van de Voort
Actually, in Turbo Pascal it is a word, not an integer :-)
itsols
@Marco, hmmm... Turbo Pascal - I taught it for like 12 years since 1990 :) Actually, you can use either Word or Integer. And for those of you who loved TP, there's FreePascal now, and yes, it's open source.
Marco van de Voort
itsols: in FPC it is overloaded. And yes I do know FPC freepascal.org/aboutus.var (scroll down to end) :-)