io:get_line types

Anders Nygren anders.nygren@REDACTED
Wed Apr 14 16:58:36 CEST 2010


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


More information about the erlang-bugs mailing list