Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Explanation pls
Message
From
07/03/2011 04:03:47
 
 
To
07/03/2011 02:03:00
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
01502561
Message ID:
01502809
Views:
40
>>>>
>>>>So... the ToString() value actually does exceed the max.
>>>>
>>>>That was fun.
>>>
>>>No it wasn't ! I had to buy a bigger monitor :-}
>>
>>LOL it was a long number.
>>
>>in finishing off that large number lib, I ran into this:
>>
>>C#
>> ? -1000 % 3 = -1
>>
>>VFP
>> ? -1000 % 3 = 2
>>
>>Can anyone explain that one?
>
>Yes - see http://en.wikipedia.org/wiki/Modulo_operation
>
>vfp : the modulo result has the same sign as the divisor( here 3)
>C# the modulo result has the same sign as the dividend( here -1000)

Not much of a consenus between languages on that link ;-}
Also hadn't occurred to me that, as per link, this wouldn't work in C#:
bool isOdd = -3 % 2 == 1;
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform