# HG changeset patch # User Claus Gittinger # Date 934448006 -7200 # Node ID f68de0746dabc923f9938b06425b0a98b7ae0d8a # Parent 64d6624dae5e41866d06065d23a16fe5b2a2e9fe checkin from browser diff -r 64d6624dae5e -r f68de0746dab Float.st --- a/Float.st Thu Aug 12 10:46:07 1999 +0200 +++ b/Float.st Thu Aug 12 10:53:26 1999 +0200 @@ -882,7 +882,7 @@ ^ (((self basicAt:8) bitAnd:16r1F) bitShift:24) + ((self basicAt:7) bitShift:16) + ((self basicAt:6) bitShift:8) + - (self basicAt:5) + (((self basicAt:5) + (self basicAt:1) + (self basicAt:2)) bitAnd:16rFF) " 3 hash @@ -1407,6 +1407,23 @@ ^ self elementBoundsError ]. ^ self subscriptBoundsError:index +! + +basicSize + "return the size in bytes of the float. + + Notice: + the need to redefine this method here is due to the + inability of many machines to store floats in non-double aligned memory. + Therefore, on some machines, the first 4 bytes of a float are left unused, + and the actual float is stored at index 5 .. 12. + To hide this at one place, this method knows about that, and returns + values as if this filler wasnt present." + +%{ /* NOCONTEXT */ + + RETURN (__MKSMALLINT(sizeof(double))); +%}. ! ! !Float methodsFor:'special access'! @@ -1908,6 +1925,6 @@ !Float class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.97 1999-08-12 08:45:45 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.98 1999-08-12 08:53:26 cg Exp $' ! ! Float initialize!