[GemStone-Smalltalk] #asInteger truncates instead of rounding

martin_kraft at comcast.net martin_kraft at comcast.net
Sun Feb 2 08:26:42 PST 2014


Hi Richard, 

we do rely on VisualWorks answering the same result as GemStone, which is truncating towards zero. 

If you could get VisualWorks >= v9.10 aligned with GemStone >= v3.2 and the ANSI standard in some future version I would be happy to support this questionable approach once we upgrade both GS and VW. 


Nevertheless, my personal opinion of "asInteger" sent to a number is that it should truncate towards zero. 

Other languages do that since many years. 


Maybe a reason to revisit the Smalltalk ANSI standard for "asInteger" ... :-) 


Cheers, 
Martin F.Kraft 

----- Original Message -----

From: "Richard Sargent" <richard.sargent at gemtalksystems.com> 
To: gemstone-smalltalk at lists.gemtalksystems.com 
Sent: Thursday, January 30, 2014 1:58:05 PM 
Subject: [GemStone-Smalltalk] #asInteger truncates instead of rounding 

As some of you may have noticed, #asInteger truncates. ANSI Smalltalk 
specifies that it should round. Consequently, we are considering changing 
this with the other ANSI compatibility changes we are making for the 3.2 
release. 

I would like to know whether anyone is relying on the the truncation 
behaviour or would rather we do not change this. 


Thanks, 
Richard 



-- 
View this message in context: http://forum.world.st/asInteger-truncates-instead-of-rounding-tp4740457.html 
Sent from the Gemstone/S mailing list archive at Nabble.com. 
_______________________________________________ 
GemStone-Smalltalk mailing list 
GemStone-Smalltalk at lists.gemtalksystems.com 
http://lists.gemtalksystems.com/mailman/listinfo/gemstone-smalltalk 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/gemstone-smalltalk/attachments/20140202/077d46cf/attachment.html>


More information about the GemStone-Smalltalk mailing list