difference between unix and windows erlang?
Bengt Kleberg
eleberg@REDACTED
Tue Nov 5 12:47:19 CET 2002
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
-------------- next part --------------
%%% -*- 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