difference between unix and windows erlang?

Vlad Dumitrescu vlad_dumitrescu@REDACTED
Tue Nov 5 13:46:06 CET 2002


Hi,

It looks like io:get_line never returns eof, instead just sits and waits
after the last line was read.

regards,
Vlad

----- Original Message -----
From: "Bengt Kleberg" <eleberg@REDACTED>
To: <erlang-questions@REDACTED>
Sent: Tuesday, November 05, 2002 12:47 PM
Subject: difference between unix and windows erlang?


> the included super simple program can be run on my sparcstation like this:
>
> erl -noshell -s reversefile main < afile
>
> could somebody please try it on a windows erlang system?
> and if it hangs, is there an explanation?
>
>
> bengt
>


----------------------------------------------------------------------------
----


%%% -*- mode: erlang -*-
%%% $Id: reversefile.erlang,v 1.1 2001/05/15 08:05:58 doug Exp $
%%% http://www.bagley.org/~doug/shootout/

-module(reversefile).
-export([main/0, main/1]).

main() -> main(['1']).
main(Args) ->
io:put_chars( read_reverse( io:get_line( '' ), [] ) ),
    halt(0).

read_reverse( eof, Lines ) ->
Lines;
read_reverse( Line, Lines ) ->
read_reverse( io:get_line( '' ), [Line|Lines] ).



More information about the erlang-questions mailing list