Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Funny, not so
Message
De
13/10/2010 10:19:54
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01485207
Message ID:
01485286
Vues:
113
>VFP has no '--' operator. It's valid arithmetic expression and result is correct.
>
>>* typo 3 => bad result (better a syntax error !)
>>? 10--2

I was not referring to the result, or '--' operator, but the syntax.

It is a valid arithmetic expression?
Depends on how you interpret the signs.

I would prefer if every '--'.'-+','+-','++' I would return a syntax error.

Infact:
? 1--1        &&  2
? 1-(-(-1))  &&  OK 0
? 1--(-1)    &&  0
? 1---1      &&  Error Missing operand !
?  0--1      &&  1
?  --1        &&  Error Missing operand !
?  -(-1)      &&  OK 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform