[erlang-questions] syntax errror on :
Sat Aug 8 20:30:41 CEST 2015
So it's me who needs to read more carefully - touche!
Your syntax error is in terminating two clauses with commas - commas
separate expressions. Delete them.
Out of curiosity, what's wrong with the bad match error? Who's saying you
need to map that to some string?
On Sat, Aug 8, 2015 at 1:27 PM, Roelof Wobben <r.wobben@REDACTED> wrote:
> Op 8-8-2015 om 20:24 schreef Garrett Smith:
> This is actually Joe's way:
> On Sat, Aug 8, 2015 at 1:19 PM, Roelof Wobben <r.wobben@REDACTED> wrote:
>> char_to_shape(Char) ->
>>> case Char of
>>> $R -> get_dimension(rectangle);
>>> $T -> triangle;
>>> $E -> ellipse;
>>> $r -> rectangle;
>>> $t -> triangle;
>>> $e -> ellipse
> I think your immediate problem is just reading a bit more carefully. Oh,
> and try not to use the list as a compiler :)
> That was Joe first way.
> Later he explained thet try catch because the exercise needs to give error
> [image: Avast logo] <https://www.avast.com/antivirus>
> Dit e-mailbericht is gecontroleerd op virussen met Avast
> www.avast.com <https://www.avast.com/antivirus>
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions