[erlang-questions] Keyword documentation
tsuraan
tsuraan@REDACTED
Fri Feb 19 17:46:21 CET 2010
> The following are reserved words in Erlang:
Ok, so assuming no definitive list of what they do exists, I guess
I'll start one :) These are either from the top of my head, or
http://erlang.org/doc/reference_manual/expressions.html . Any
corrections, completions, clarifications are welcome.
> after
Sets the timeout in a receive block
> and
boolean logic "and"
> andalso
short-circuiting "and"
> band
bitwise "and"
> begin
Start a block, used for grouping expresssions (no idea what use it is)
> bnot
> bor
bitwise "not" and "or"
> bsl
> bsr
Shift bits left and right
> bxor
bitwise "xor"
> case
Beginning of a case statement, sort of like C's switch statement
> catch
Trap an error, converting it into the tuple {'EXIT', ...}. If no
error occurs, the result of the wrapped function is returned. Also
used in the try statement.
> cond
?
> div
integer division
> end
Complete a statement (fun, case, try, etc).
> fun
Begin an anonymous function
> if
Erlang's crazy if statement.
> let
?
> not
Logical "not"
> of
Goes between value of case statement and guard clauses
> or
Logical "or"
> orelse
Short-circuiting "or"
> query
Obsolete, something about mneosyne?
> receive
used to get the next message from the process mailbox
> rem
Remainder from integer division (modulus)
> try
New way to trap errors, used with catch and ends with end
> when
Start a guard sequence for receive, function declaration, others?
> xor
Logical xor
More information about the erlang-questions
mailing list