[erlang-bugs] io:get_line types
Niclas Eklund
nick@REDACTED
Fri Apr 16 14:54:50 CEST 2010
Hello!
I cannot tell why the io:get_line call didn't follow the documented API,
but ssh_sample_cli.erl has now been corrected.
Best regards,
Niclas @ Erlang/OTP
On Wed, 14 Apr 2010, Anders Nygren wrote:
> In io.erl the types specified for get_line/1 is
>
> -type prompt() :: atom() | string().
> -spec get_line(prompt()) -> iodata() | 'eof' | {'error', term()}.
>
> get_line(Prompt) ->
> get_line(default_input(), Prompt).
>
> And that is also what the documentation states.
>
> But in ssh/examples/ssh_sample_cli.erl there is
>
> Line = io:get_line({format, "CLI> ", []}),
>
> Is this a secret unsupported invocation or is it an error in the
> io documentation?
>
> If it is unsupported it should not be used in examples.
>
> /Anders
>
> ________________________________________________________________
> erlang-bugs (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-bugs-unsubscribe@REDACTED
>
More information about the erlang-bugs
mailing list