[Newbies] How does one create an array of points?

Michael Rice limitcase at gmail.com
Mon Jun 20 15:44:03 UTC 2016


Weird, but what do I know.

I see that this (a period separating each from the next) also works:

{1 at 1. 2 at 2. 3 at 3} => {1 at 1 . 2 at 2 . 3 at 3}

Thanks, all.



On Mon, Jun 20, 2016 at 11:29 AM, Ron Teitelbaum <ron at usmedrec.com> wrote:

> Hi Michael,
>
>
>
> Good question!
>
>
>
> {Point x:1 y:1. Point x:2 y:2.}
>
>
>
> It’s not obvious!  Notice the periods after the end of each element.
>
>
>
> All the best,
>
>
>
> Ron Teitelbaum
>
>
>
> *From:* beginners-bounces at lists.squeakfoundation.org [mailto:
> beginners-bounces at lists.squeakfoundation.org] *On Behalf Of *Michael Rice
> *Sent:* Monday, June 20, 2016 11:21 AM
> *To:* SqueakList
> *Subject:* [Newbies] How does one create an array of points?
>
>
>
> I've been trying to create an array of points (in Squeak 5) but am failing
> badly. See below: first part => what I get when I exec "print it" on the
> first part. Guidance please.
>
>
>
> #(1 at 1 2 at 2) => #(1 #@ 1 2 #@ 2)
>
>
>
> #((Point x: 1 y: 1) (Point x: 2 y: 2)) =>  #(#(#Point #x: 1 #y: 1)
> #(#Point #x: 2 #y: 2))
>
>
>
> #(12 'b' $c) => #(12 'b' $c)
>
>
>
> #(12 'b' $c 1 at 1) => #(12 'b' $c 1 #@ 1)
>
>
>
> #(12 'b' $c (1 at 1)) => #(12 'b' $c #(1 #@ 1))
>
>
>
> #(12 'b' $c (Point x: 1 y: 1)) => #(12 'b' $c #(#Point #x: 1 #y: 1))
>
>
>
> Point x:1 y: 1 =>  1 at 1
>
>
>
> (Point x:1 y: 1) => 1 at 1
>
>
>
> #((Point x: 1 y: 1)) => #(#(#Point #x: 1 #y: 1))
>
>
>
> #(1 at 1) => #(1 #@ 1)
>
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160620/6f790e84/attachment-0001.htm


More information about the Beginners mailing list