No subject

Bob Smart <>
Sun Jan 16 00:50:04 CET 2000


Why is this an illegal guard

-module(t).
-export([test/0]).

test() ->
  if
    33 == list_to_integer("33") -> 99;
    true -> 88
  end.

but this is ok

-module(t).
-export([test/0]).

test() ->
  Num = list_to_integer("33"),
  if
    33 == Num -> 99;
    true -> 88
  end.


Bob



More information about the erlang-questions mailing list