[erlang-questions] Questions on match specifications

OvermindDL1 overminddl1@REDACTED
Fri Nov 11 06:13:24 CET 2011


On Nov 10, 2011 7:34 PM, "wrp" <i3text@REDACTED> wrote:
>
> Match specifications don't appear to be complicated, but the
> documentation on them is sparse. I found the description in Cesarini &
> Thompson to be much clearer than in the ERTS User's Guide, but I still
> have some points of confusion.
>
> For starters:
>
> 1. Quoting seems incosistent. Why is 'and' quoted but andalso is not?

'and' and and are the same.
'andalso' and andalso are the same.
Just atoms is all it is.

>
> 2. Why is float division (/) not accepted in guards?

No clue, I did not know it was, I am curious too.

>
> 3. In the case of infix operators, does {'op','$1','$2'} always mean
> "$1 op $2" (vs. "$2 op $1")?

I think so, but do not quote me, wait for another to answer, I do not have
the source right now.

>
> 4. The ERTS User's Guide lists get_tcw as an allowed function in ets
> matches. Is that correct?
>

No clue.
_______________________________________________
> erlang-questions mailing list
> 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/20111110/b9c5a1f0/attachment.htm>


More information about the erlang-questions mailing list