[erlang-questions] Comma, semicolon. Aaaaa
Lone Wolf
hubaghdadi@REDACTED
Tue Sep 18 01:31:46 CEST 2007
>>comma is the sequencing operator.
>>The simple answer is that the comma operator in Erlang is
an infix sequencing operator, EXACTLY the same as the comma
operator in C or C++. E1, E2, E3 has the effects of E1 then
E2 then E3 in that order and the value of E3.
What does this mean?
Would some one please shed some light on it since I'm not a C guy?
An example maybe?
>>C: x > y ? e1, e2 : (e3, e4)
Erlang: if x > y -> e1, e2 ; true -> e3, e4 end
I didn't understand this example.
Sorry guys but I didn't know anything in C language.
Thanks for help.
Deep into that darkness peering, long I stood there, wondering, fearing, Doubting, dreaming dreams no mortal ever dreamed before.
E.A Poe
---------------------------------
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070917/22e14577/attachment.htm>
More information about the erlang-questions
mailing list