// only returns a decimal number if one or more of the arguments in the
expression is a decimal number.  Therefore, if you make sure your
arguments are integers first, you will know that your // result
will also be an integer.


On 18-Nov-1999/15:43:49+1:00, [EMAIL PROTECTED] wrote:
>
>While doing the Julian script I had some problems with floating point
>numbers. 
>
>1) Why the return of a // (modulus) operation is a float? The returned
>value cannot be used directly in a switch form unless it is converted to
>an integer.
>
>2) Try to subtract two float numbers returns a float that it is not a
>"precise" number. That is, if you try to subtract 12345678.3 to 12345678
>you obtain a number which is not 0.3 but 0.3000003232something.
>
>3) There's no a way to truncate float numbers to a precise digit after the
>point instead to have to keep it as it is returned from a mathematical
>operation?
>
>4) There's no way to force a number to have trailing 0 in from of it? That
>is having 09 kept as such instead of being converted to 9? There's not a
>native function that does this when converting numbers into a string (sort
>of %z or other formatter for C string?)? This is good to join numbers
>together at their right position in a bigger number.  May be stupid, but
>is some time useful. I.e. You have a number 1234 and a numner 678 and you
>want to put them together to obtain the number 12340678, or 1234.0678. 
>
>Thanks in advance for eventual answers.
>
>M&F
>
>
-- 
                           Bohdan "Bo" Lechnowsky
                           REBOL  Adventure Guide
           REBOL Technologies 707-467-8000 (http://www.rebol.com)
          Download the REBOL Messaging Language for all Platforms

Reply via email to