1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
[;1m script(Filename)[0m
Reads and evaluates Erlang expressions, separated by [;;4m.[0m (or [;;4m,[0m,
a sequence of expressions is also an expression), from the file.
Returns one of the following:
• [;;4m{ok, Value}[0m - The file is read and evaluated. [;;4mValue[0m is
the value of the last expression.
• [;;4m{error, atom()}[0m - An error occurred when opening the file
or reading it. For a list of typical error codes, see [;;4m[0m
[;;4mopen/2[0m.
• [;;4m{error, {Line, Mod, Term}}[0m - An error occurred when
interpreting the Erlang expressions in the file. Use [;;4m[0m
[;;4mformat_error/1[0m to convert the three-element tuple to an
English description of the error.
The encoding of [;;4mFilename[0m can be set by a comment as described in [;;4m[0m
[;;4mepp[0m.
[;1m script(Filename, Bindings)[0m
The same as [;;4mscript/1[0m but the variable bindings [;;4mBindings[0m are
used in the evaluation. See [;;4merl_eval[0m about variable bindings.
|