disabling compiler warnings

Thomas Arts thomas@REDACTED
Wed Apr 19 15:37:40 CEST 2000


Gunilla Hugosson wrote:
> 
> Based on my experiences from teaching Erlang courses,
> the warnings really are useful. A more experienced
> programmer can turn off the warnings like Mattias indicated.
> 
> In my mind, an even better solution to the problem is to
> rewrite the if.  Instead of:
> 
>  if
>    Bertil>3 ->
>      Arne = true;
>    true ->
>      Arne = false
>  end
> 
> Write:
>   Arne = if
>            Bertil>3 ->
>              true;
>            true ->
>              false
>          end

Or use logic and write:

Arne = Bertil =< 3.

/Thomas

Rule of thumb: if you see a line "false -> true" you missed an opertunity to shrink
the codesize.



More information about the erlang-questions mailing list