Next: , Up: Number   [Index]


1.122.1 Number class: converting

coerce: aNumber

Answer aNumber - whatever class it belongs to, it is good

readFrom: aStream

Answer the number read from the rest of aStream, converted to an instance of the receiver. If the receiver is number, the class of the result is undefined – but the result is good.

readFrom: aStream radix: anInteger

Answer the number read from the rest of aStream, converted to an instance of the receiver. If the receiver is number, the class of the result is undefined – but the result is good.

The exponent (for example 1.2e-1) is only parsed if anInteger is 10.