Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Well you seem to have misstated the problem, or you are being tooo 'picky'...
As Sergey's example does, anything except "N" is non-numeric, whether the type function returns "U" or "C" or anything else except "N".
You haven't indicated that you NEED to be able to differentiate between "piano" and "123 piano" in the prior messages, and it still isn't clear that you need to.
good luck
>When the user puts in just digits, I know it's numeric. If he puts in just characters, I know it's a string. But how do I know that when the user puts in '123 piano' that it is character if the type() function returns 'U' and the val() function return 123.00 (sugesting it is numeric). What I do now is I test each character separately, but I want to know if there is no other, easier way.
Précédent
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