catch not an rvalue
Tue Feb 19 17:29:58 CET 2002
1> X = (catch 22).
On 19 Feb 2002, Hal Snyder wrote:
> Hope this isn't another RTFM, but I can't resist asking.
> Am going through the puzzle box while home with the flu.
> During prototyping, it would be nice to replace
> X = <risky expression>
> X = catch <risky expression>
> but the shell (and compiler) don't like that.
> Just wondering why the syntax error is happening.
> Didn't see the answer in, e.g., Chap 6 of
> 1>catch 22.
> 2> X=catch 22.
> ** 1: syntax error before: 'catch' **
> 3> F=fun()->catch 22 end.
> 4> X=F().
More information about the erlang-questions