Message
From
28/09/2006 11:51:33
Calvin Smith
Wayne Reaves Computer Systems
Macon, Geórgia, United States
 
 
To
23/09/2006 02:31:22
General information
Fórum:
Visual FoxPro
Category:
Programação, sintaxe e comandos
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
ID da thread:
01156435
ID da mensagem:
01157873
Views:
22
OK, perhaps just a mention that the return when negative numbers are used will not be what you expect. By the way, is VB incorrect when it returns -1 or have they redefined the meaning of MOD to mean just the remainder when you divide by both negative and positive numbers?

The definition in the VFP help file reads 'Divides one numeric expression by another numeric expression and returns the remainder.' I am not a math guy so I just believed the definition given and, therefore, I would expect MOD(-13,4) to return -1.
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Previous
Next
Responder
Mapa
View