Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Pascal
uses sysutils;
f := StrToFloat(s);

raises an exception if s is not the textual representation of a float (e.g. 'foobar')
uses sysutils;
f := s.ToExtended;

* Works correctly in Lazarus IDE v. >= 1.8.0.
* Type Float = Extended
(read-string s)

Uses the Clojure reader to parse a string into a float and is thus platform agnostic.

New implementation...