[erlang-questions] command-line args in erl

David Mercer dmercer@REDACTED
Thu Apr 15 23:28:32 CEST 2010


On Thursday, April 15, 2010, Wes James wrote:

> render:main([200,200]).
> 
> spits out:
> 
> ** exception error: bad argument
>      in function  atom_to_list/1
>         called as atom_to_list(200)
>      in call from render:main/1
> 
> what should main(??) look like?

Looking at the Makefile, it looks like it is designed to be run from the
command line, where the arguments are passed in as atoms.  Try:

render:main(['200', '200']).

Cheers,

David



More information about the erlang-questions mailing list