Good practice

Wiger Ulf ulf.wiger@REDACTED
Sun Jun 8 22:25:51 CEST 2003


Try this:

Response =
   case checkvalid(Funcref, Correctlist) of
      false -> false;
      Other -> invoker(Other, Otherargs)
   end,
Requester ! Response,
...

/Uffe

----- Original Message -----
From: <erlang@REDACTED>
To: <erlang-questions@REDACTED>
Sent: den 8 juni 2003 23:28
Subject: Good practice


> bash$ erl
> Erlang (JAM) emulator version 47.4.1
>
> Eshell V47.4.1  (abort with ^G)
> 1> c(test1file).
> ./test1file.erl:172: Warning: variable 'Response' exported from ['case']
> {ok,test1file}
> 2>
>
>
> >From the file in question:
>
>       case checkvalid(Funcref, Correctlist) of
>         false ->
>           Response = false;
>         Other ->
>           Response = invoker(Other, Otherargs)
>       end,
>       Requester ! Response,
>
> Obviously the warning warns me of a problem.  This I expect, and welcome.
> However, that doesn't mean I want to see warnings; I want to do things
> right.  I could just put the message in the case statement, I suppose, but
> is there really a canonical way of doing the above without getting the
> complaint?




More information about the erlang-questions mailing list