[erlang-questions] Escript

Bjorn Gustavsson bjorn@REDACTED
Mon Apr 2 11:48:43 CEST 2007


I based the R11B-4 version of escript on Joe's escript-4.1 (without
your patch), but among other things I changed how the arguments are
passed.

I did consider passing the script name as the first argument in the
list, but in the end I didn't want to break compatibility with Joe's
escript or with the description in his book.

We'll probably add a function to the escript module to retrieve the name
of the script in the R11B-5 release. (Unless someone comes up with a better
name, I'll probably call it escript:script_name/0.)

/Bjorn

Bengt Kleberg <bengt.kleberg@REDACTED> writes:

> On 2007-03-28 15:52, Bjorn Gustavsson wrote:
> > escript is included in R11B-4.
> 
> it it possible to get the name of the script when using escript?
> 
> i notice that the escript that is included in R11B-4 does not have the 
> script itself as the first argument (like a $0 is a shell script). ex:
> #! /tmp/erlang/bin/escript
> 
> main( Arg ) ->
>          io:fwrite( "~w~n", [Arg] ).
> 
> 
> i made a patch for joe's escript-4.1 that made the script name 
> available, but escript.erl in R11B-4 does not look like it was made from 
> escript-4.1
> 
> 
> bengt
> -- 
> Those were the days...
>     EPO guidelines 1978: "If the contribution to the known art resides
>     solely in a computer program then the subject matter is not
>     patentable in whatever manner it may be presented in the claims."
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
> 

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB




More information about the erlang-questions mailing list