Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mod() function Bug?
Message
 
À
22/09/2006 10:30:37
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01156435
Message ID:
01156673
Vues:
20
MOD is defined as the difference between a number and the next lower number that is evenly divided by the second argument. If you consider the numbers in your example you have -13 which is not evenly divied by 4, the nest loser number that is evenly divided by 4 is -16 (not -12 whihc is higher than -13) and the difference is 3. This si the corre3ct MOD for -13 and 4, if VB gives 1 as an answer then it is wrong.


>The mod command gives stange results when done this way:
>Mod(-13,4). I would expect this to return either 1 or -1 but it returns 3.
>Visual Basic return -1 for this command but Ruby return the same thing as VFP. Can someone explain this to me.... Thanks.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform