[erlang-questions] Comma, semicolon. Aaaaa (Emmanuel Okyere)

Emmanuel Okyere eokyere@REDACTED
Mon Sep 17 04:00:33 CEST 2007


On 16 Sep 2007, at 15:19, Ahmed Ali wrote:

> I'll try to give you my view on the syntax. The comma (,) is like  
> (;) in
> languages like Java/C. Each method is ended with a Dot (.). If you  
> have more
> than one method with the same number parameters (called arity in  
> Erlang),
> you need to separate them with  (;).  There is no similar construct in
> Java/C for this.

correct.

> Similarly, you can think of if/case statements, which use (;) to  
> separate
> different if/case conditions,  (,) to separate clauses for each  
> condition,
> and (.) to indicate the end of if/case statement.

not quite.
if the end of the if/case clause is not the end of the entire  
function it will not end with a period.
a period-whitespace denotes the end of an entire function.

Cheers,
Emmanuel

---
Anyone can do any amount of work, provided it isn't the work he is  
supposed to be doing at that moment. – Robert Benchley

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


More information about the erlang-questions mailing list