Re: [Newbies] array literal - a misunderstanding?

2007-03-05 Thread Thomas Fischer

Hi,

 The Terse guide to Squeak at http://wiki.squeak.org/squeak/5699 may help.

Thanks for this Link.

Arrrgh! There is no curly brace in the Terse guide

salute
Thomas
-- 
View this message in context: 
http://www.nabble.com/array-literal---a-misunderstanding--tf3344098.html#a9316617
Sent from the Squeak - Beginners mailing list archive at Nabble.com.

___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Re: [Newbies] array literal - a misunderstanding?

2007-03-05 Thread Bert Freudenberg


On Mar 5, 2007, at 18:48 , Thomas Fischer wrote:



Hi,

The Terse guide to Squeak at http://wiki.squeak.org/squeak/5699  
may help.


Thanks for this Link.

Arrrgh! There is no curly brace in the Terse guide


It's a wiki. Add it.

- Bert -


___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Re: [Newbies] array literal - a misunderstanding?

2007-03-04 Thread Mathieu Suen

Is because the #(..) array is a literal build at compile time.
If you want a flat array use the {} syntax.
But this is specific to Squeak. You will not find it in VW for example.

Rather prefer the Array class#with:with:with:

Math

On Mar 4, 2007, at 10:47 PM, Thomas Fischer wrote:



#(1 2 (1 + 3))  unexpected result: #(1 2 #(1 #+ 3)) 

Why squeak means, that (1 + 3) is an array and not 4?


___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


RE: [Newbies] array literal - a misunderstanding?

2007-03-04 Thread Ron Teitelbaum
Hi Thomas,

The #() syntax is for a regular array but for a literal array you want {}
(curly braces) 

Try this: {1. 2. 1 + 3.}

Hope that helps,

Ron Teitelbaum

 From: Thomas Fischer
 
 
 Hello list,
 
 I'm starting for a couple of days with smalltalk/squeak - maybe it's not
 my
 last post  :)
 
 I like to construct a flat array, but get a nested array:
 
 #(1 2 (1 + 3))  unexpected result: #(1 2 #(1 #+ 3)) 
 
 Why squeak means, that (1 + 3) is an array and not 4?
 
 The syntax for an array literal is defined via#( - isn't it?
 
 salute
 Thomas
 --
 View this message in context: http://www.nabble.com/array-literal---a-
 misunderstanding--tf3344098.html#a9300859
 Sent from the Squeak - Beginners mailing list archive at Nabble.com.
 
 ___
 Beginners mailing list
 Beginners@lists.squeakfoundation.org
 http://lists.squeakfoundation.org/mailman/listinfo/beginners


___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners