Subject: Re: [erlang-questions] escript exception error,
undefined function, why can't use fun in escript
On Sun, Aug 06, 2017 at 04:22:33PM +0200, Håkan Mattsson wrote:
> Yes, you may have other functions than main/1 in escripts. But the escript
> must be compiled.
> Either compiled in run-time
> (using -mode(compile)
> or pre-compiled (using a beam file or archive).
Actually no, you don't need the escript to be compiled to have functions
in there. They work just fine, it's just that they cannot be referenced
with `fun foo/X' syntax if the escript script is not marked as compiled.
erlang-questions mailing list