Hi Oldes, You can find some conversion routines for binary to REBOL decimal in decimal.r.
http://www.nwlink.com/~ecotope1/reb/decimal.r There are two formats: big-endian and little-endian. The little-endian (least significant bits first in memory) is the Intel standard. The routines allow you to reverse the bytes, if necessary. If you don't know the endian convention, just try it with and without reverse on a sample number. Some examples: >> real/to-native/rev 0.1 == #{9A9999999999B93F} >> real/to-native/rev 0.2 == #{9A9999999999C93F} >> real/to-native/rev 0.5 == #{000000000000E03F} >> real/to-native/rev 1.5 == #{000000000000F83F} It appears the flash format puts the last 4 bytes first and vice versa. So you might need to make this change to flash format numbers before using real/form-native/rev. HTH -Larry ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 15, 2002 10:17 AM Subject: [REBOL] Decimal! to Binary! conversion > Decimal! to Binary! conversion > ============================== > Hello rebolers... > does anybody know how to convert decimal number to binary format? > > In Flash it's stored as: > 0.1 = #{9999B93F9A999999} > 0.2 = #{9999C93F9A999999} > 0.5 = #{0000E03F00000000} > 1.5 = #{0000F83F00000000} > > That gives me no sense... please help me:-) > thanks Oldes > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. > -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
