newbie question

Ulf Wiger (AL/EAB) <>
Tue May 17 13:14:53 CEST 2005


Dietmar Schaefer wrote:
> Hi !
> 
> Isn't that supposed to work ?
> 
> 
> if  cmmc_db:getProcState(Key,Name) /= State -> 

No. Only guard expressions are allowed in if clauses.


> instead I have to write
> 
> ProcState = cmmc_db:getProcState(Key,Name),
> 
> if ProcState /= State ->

or 

case cmmc_db:getProcState(Key,Name) of
   S when S /= State ->
   ...
end

or 

case cmmc_db:getProcState(Key,Name) /= State of
   true ->
      ...
end.


/Uffe



More information about the erlang-questions mailing list