From: Jacob Fugal Date: 2006-02-28T04:03:01+09:00 Subject: Re: Ruby Whitespace Semantics On 2/27/06, Mark Wilden wrote: > "Hal Fulton" wrote: > > Expressions in Ruby can be like standalone statements. Statements are > > terminated with an optional semicolon or with a newline. If a statement > > is incomplete, it is understood to go on to the next line; if it is > > complete, it is just as if terminated with a semicolon. > > > > Therefore: > > > > a = (4 > > +5) > > > > is the same as > > > > a = (4; > > +5) > > But (4 is clearly an incomplete statement. Actually, notice the semicolon. What Hal is demonstrating is that a parenthetical group can contain multiple expressions. The newline terminates the expression '4', which is a complete expression, while the statement (which happens to include that expression) is continued on the next line. Jacob Fugal