[erlang-questions] Illegal Guard?

Rad Gruchalski radek@REDACTED
Fri Feb 5 13:51:31 CET 2016


It’s explained here: http://erlang.org/doc/reference_manual/expressions.html#id83710  
The set of valid guard expressions (sometimes called guard tests) is a subset of the set of valid Erlang expressions. The reason for restricting the set of valid expressions is that evaluation of a guard expression must be guaranteed to be free of side effects.










Kind regards,

Radek Gruchalski

radek@REDACTED (mailto:radek@REDACTED)
 (mailto:radek@REDACTED)
de.linkedin.com/in/radgruchalski/ (http://de.linkedin.com/in/radgruchalski/)

Confidentiality:
This communication is intended for the above-named person and may be confidential and/or legally privileged.
If it has come to you in error you must take no action based on it, nor must you copy or show it to anyone; please delete/destroy and inform the sender immediately.



On Friday, 5 February 2016 at 13:40, Theepan wrote:

>  
> Team - Any idea?
>  
>  
>  
>  
>  
>  
> 60>  
>  
>  
> 60>  
>  
>  
> 60> is_integer(A = 5).                        
>  
>  
> true
>  
>  
> 61>  
>  
>  
> 61> fun () when is_integer(A = 5) -> ok end.   
>  
>  
> * 2: illegal guard expression
>  
>  
> 62>  
>  
>  
> 62>  
>  
>  
> 62>  
>  
>  
> 62> fun () when is_integer(5) -> ok end.      
>  
>  
> #Fun<erl_eval.20.54118792>
>  
>  
> 63>  
>  
>  
> 63>  
>  
>  
> 63> fun (A = 5) when is_integer(A) -> ok end.  
>  
>  
> #Fun<erl_eval.6.54118792>
>  
>  
> 64>  
>  
>  
> 64>  
>  
>  
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED (mailto:erlang-questions@REDACTED)
> http://erlang.org/mailman/listinfo/erlang-questions
>  
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160205/076bf468/attachment.htm>


More information about the erlang-questions mailing list