[erlang-questions] What does Prompt in io:get_line/2 do?

Ivan Uemlianin ivan@REDACTED
Thu May 29 16:35:13 CEST 2014


Aha thanks.  Special atoms.  Also standard_error.

Ivan

On 29/05/2014 15:24, Roger Lipscombe wrote:
> 1> io:get_line(standard_io, foo).
> foohaskgjdhgsdg
> "haskgjdhgsdg\n"
> 2> io:get_line(standard_io, enter_something).
> enter_somethingsdgdsgsgsad
> "sdgdsgsgsad\n"
> 3> io:get_line(standard_io, 'meh>').
> meh>fdasfhjdgfsadg
> "fdasfhjdgfsadg\n"
>
> On 29 May 2014 15:07, Ivan Uemlianin <ivan@REDACTED> wrote:
>> Dear All
>>
>> Quick question!
>>
>> In io:get_line(IoDevice, Prompt), what is the point of Prompt?  Just using a
>> random atom seems to work fine.
>>
>> 1> {ok,F} = file:open("data.txt",[read, {encoding, utf8}]).
>> {ok,<0.36.0>}
>> 2> io:get_line(F, x).
>> "first line\n"
>> 3> io:get_line(F, y).
>> "second line\n"
>> % ... etc
>>
>> Thanks
>>
>> Ivan
>>
>>
>> --
>> ============================================================
>> Ivan A. Uemlianin PhD
>> Llaisdy
>> Speech Technology Research and Development
>>
>>                      ivan@REDACTED
>>                       www.llaisdy.com
>>                           llaisdy.wordpress.com
>>                github.com/llaisdy
>>                       www.linkedin.com/in/ivanuemlianin
>>
>>                          festina lente
>> ============================================================
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions

-- 
============================================================
Ivan A. Uemlianin PhD
Llaisdy
Speech Technology Research and Development

                     ivan@REDACTED
                      www.llaisdy.com
                          llaisdy.wordpress.com
               github.com/llaisdy
                      www.linkedin.com/in/ivanuemlianin

                         festina lente
============================================================



More information about the erlang-questions mailing list