>>>>-2**2
>>>>
>>>>what the answer... I lost my bet with my secondary schoolgirl daughter... :(
>>>
>>>-2^2 = -(2)^2 = -4
>>>
>>>That is why () are so important. (-2)^2 = 4
>>
>>VFP and me really flunked... :(
>
>The answer of vfp is correct - but it does like all prog languages - although not mentioned in the help - the unary operators have the highest precedence
>
>But in maths the answer would be -4
It seem your math is good. But I was at %1 at 1987's university selection exam. Mine math was good too. How could I forget a basic thing like that. :(
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement