SV: not quite a bug, but...
Vlad Dumitrescu
vlad_dumitrescu@REDACTED
Wed Mar 27 14:46:55 CET 2002
> > > > The faulty code was:
> > > > case NewTime = 0 of
> > > > true -> ...
> > > > false ->
> > > > end,
>I don't want to be difficult here (:-), but it is useful. You may actually
>want to keep
>the value of the expression for later use and not just within the case
>where
>you can use aliases. It is, alas, a property of Erlang's variable scoping
>that you
>can bind a variable anywhere.
Well, since one can always write
NewTime = value(),
case NewTime of
...
which is much better style, I thought it might deserve a warning :-)
regards,
Vlad
_________________________________________________________________
Kom med i världens största e-posttjänst; MSN Hotmail.
http://www.hotmail.com/sv
More information about the erlang-questions
mailing list