Fun with symbols

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

Fun with symbols

jannik laval
Hi guys,

Something I did not know and I would like to share:
what is the result of "#a < #9" ? DNU !

When I expected to compare two symbols, in fact "#9 class" returns SmallInteger.
So if I want to compare two symbols, I have to do "#a < #'9' ".

Kind of small fun things !
Cheers,

Jannik
Reply | Threaded
Open this post in threaded view
|

Re: Fun with symbols

Stéphane Ducasse
Jannik can you
        - write a test
        - add a bug entry

This would be to align this point. And also verify it in VW, Squeak and other.

Stef

On Jul 26, 2013, at 9:43 PM, jannik.laval <[hidden email]> wrote:

> Hi guys,
>
> Something I did not know and I would like to share:
> what is the result of "#a < #9" ? DNU !
>
> When I expected to compare two symbols, in fact "#9 class" returns SmallInteger.
> So if I want to compare two symbols, I have to do "#a < #'9' ".
>
> Kind of small fun things !
> Cheers,
>
> Jannik


Reply | Threaded
Open this post in threaded view
|

Re: Fun with symbols

jannik laval
https://pharo.fogbugz.com/default.asp?11257

Jannik

On Jul 27, 2013, at 10:45 PM, Stéphane Ducasse <[hidden email]> wrote:

Jannik can you
- write a test
- add a bug entry

This would be to align this point. And also verify it in VW, Squeak and other.

Stef

On Jul 26, 2013, at 9:43 PM, jannik.laval <[hidden email]> wrote:

Hi guys,

Something I did not know and I would like to share:
what is the result of "#a < #9" ? DNU !

When I expected to compare two symbols, in fact "#9 class" returns SmallInteger.
So if I want to compare two symbols, I have to do "#a < #'9' ".

Kind of small fun things !
Cheers,

Jannik



Reply | Threaded
Open this post in threaded view
|

Re: Fun with symbols

Stéphane Ducasse
tx!


On Jul 28, 2013, at 9:49 AM, jannik.laval <[hidden email]> wrote:

https://pharo.fogbugz.com/default.asp?11257

Jannik

On Jul 27, 2013, at 10:45 PM, Stéphane Ducasse <[hidden email]> wrote:

Jannik can you
- write a test
- add a bug entry

This would be to align this point. And also verify it in VW, Squeak and other.

Stef

On Jul 26, 2013, at 9:43 PM, jannik.laval <[hidden email]> wrote:

Hi guys,

Something I did not know and I would like to share:
what is the result of "#a < #9" ? DNU !

When I expected to compare two symbols, in fact "#9 class" returns SmallInteger.
So if I want to compare two symbols, I have to do "#a < #'9' ".

Kind of small fun things !
Cheers,

Jannik