Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Feature, Bug, or this just can't be true
Message
De
01/05/2001 14:11:37
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00501962
Message ID:
00502137
Vues:
14
Ko,
I don't know where you got that document file but my help file says that 'VAL( ) returns the numbers in the character expression from left to right until a non-numeric character is encountered (leading blanks are ignored). '. What is happending when the letter 'E' is encountered is that Val() is looking past that character to see if the next character is a number or not. The letter 'E' inside a string is definitely not a numerical expression when it is considered by itself.

I would submit that there is a need for 2 Val() functions. One could be named ValE() and would try to determine if 'E' is part of a numerical expression and the other named Val() would look only at each individual letter in the string. In any case, this has caused me to have a very very bad morning as the copy protection on my app generates a 7 number sequence and adds to it the alphabetical letter corresponding to the numerical month of the year and then the last 2 digits of the year() function. This is used to generate a control code that our office responds to. This morning the codes generated were something like '1234567E01' and nobody could get back in their program. Oh well, I can always take up woodworking.
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform