size of character

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

size of character

Joseph Alotta
‘j’ size ==>  1

$j size ==> error.

Why shouldn’t the size of a character be 1?


Sincerely,

Joe.


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: size of character

Bert Freudenberg
On 23.05.2016, at 17:25, Joseph Alotta <[hidden email]> wrote:
>
> ‘j’ size ==>  1
>
> $j size ==> error.
>
> Why shouldn’t the size of a character be 1?

Because it’s not a collection: #size is part of the collection protocol, but it doesn’t make sense to send #at: to a character.

- Bert -




_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: size of character

Joseph Alotta
I see.  Thank you.


> On May 23, 2016, at 9:52 AM, Bert Freudenberg [via Smalltalk] <[hidden email]> wrote:
>
> On 23.05.2016, at 17:25, Joseph Alotta <[hidden email]> wrote:
> >
> > ‘j’ size ==>  1
> >
> > $j size ==> error.
> >
> > Why shouldn’t the size of a character be 1?
>
> Because it’s not a collection: #size is part of the collection protocol, but it doesn’t make sense to send #at: to a character.
>
> - Bert -
>
>
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>  smime.p7s (5K) Download Attachment
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://forum.world.st/size-of-character-tp4896851p4896855.html
> To start a new topic under Squeak - Beginners, email [hidden email]
> To unsubscribe from Squeak - Beginners, click here.
> NAML