[Newbies] Re: RE: array literal - a misunderstanding?

olivier mai olivier at mailq.dyndns.org
Tue Mar 6 18:49:36 UTC 2007


Mathieu,
No,
 With the brace syntax you separate STATEMENTS (hence the period) with a whitespace (tab newline etc... just as one
would with arrays). Expressions do not require a period.

 So, { (3.14 asFloat). 2.}  or { (3.14). 2. }
and just as well { (Stream on: ( String new:1204)).   'or whatever you  can get away with...'   .} (notice the periods
inside the literal string)

Olivier.

>
> Hi Mathieu,
>
>
> > try this:
> >{3.14. 2}
>
> Thanks!
> I recapitulate:
> In {} Array literals I have to use a period sign between all items.
> In #(..) array literal which build at compile time, I can never use
> expressions.
> Right?
>
> salute
> Thomas
>
> --
> View this message in context: http://www.nabble.com/array-literal---a-misunderstanding--tf3344098.html#a9307708
> Sent from the Squeak - Beginners mailing list archive at Nabble.com.



More information about the Beginners mailing list