Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Funny, not so
Message
De
13/10/2010 10:35:14
 
 
À
13/10/2010 09:52:15
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
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:
01485306
Vues:
86
>>
>>* this is ok
>>? 10-3-2
>>* typo 3 => bad result (better a syntax error !)
>>? 10--2
>>* Need a constraint in the grammar
>>? 10-(-2)
>>
>
>Why would that be wrong? If I substract 10 minus negative two, that is the same as 10 plus 2. What do you expect, and why?

Of course, but the question is how you should write this.
With 3 or more signs VFP fail! VFP requires brackets.
I'd rather the obligation of the brackets with 2 signs too.

Why this allow a small typo to create a valid expression,
but that is a calculation that the programmer did not want to do!
This may result in errors discovered after months,
you have lots of corrupted data
and to find the wrong expression you become crazy.

The only help they can give you the language of development is the syntax,
I prefer a rigid syntax, to avoid a future in a mental hospital.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform