read float in other base

nicolas cellier ncellier at ifrance.com
Fri Apr 21 19:41:56 UTC 2006


i see i can enter a float with exponent in another base than 10,
but have a very minor question illustrated in this example:

    "this one is not zero - exponent is not interpreted in base 16"
    16r1.0e10 - (16 raisedTo: 16).

    "this one is zero - exponent is interpreted in base 10"
    16r1.0e10 - (16 raisedTo: 10).

    "this one would not execute (send r10 to 16r1.0e16)
    exponent cannot be expressed in base 16"
     16r1.0e16r10 - (16 raisedTo: 16)

As shown above, exponent is always interpreted in base 10. why ?
is it compatible with any other language convention ?
(note that exponent is forbidden in VW when base is not 10, so no clue from 
this dialect...).




More information about the Squeak-dev mailing list