<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 29 May 2016 at 16:00, Donald Steven <span dir="ltr"><<a href="mailto:t6sn7gt@aim.com" target="_blank">t6sn7gt@aim.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The following works: {X, _} = string:to_float(string:strip(io:get_line("X: "), right, $\n)),<br>
<br>
but is there a less cumbersome way to read a float from the standard input?<br></blockquote><div><br>{ok, [F]} = io:fread("give me your floats: ", "~f")<br><br>Cheers,<br><br><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Thanks.<br>
<br>
Don<br>
<br>
<br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Guilherme<br></div></div></div></div></div></div>
</div></div>