Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert character into integer?
Message
De
31/01/2007 01:27:53
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01189249
Message ID:
01190760
Vues:
16
>The case of "2E828" shows the difference in the design of the error handling in VAL() and CAST() functions. The CAST() never generates an error if it cannot interpret source value but instead it returns some defualt, like 0 for numeric or empty value for strings, dates, datetimes, etc.
>

CAST function performs conversion similar to the conversion performed by APPEND FROM command.
CREATE CURSOR foo (f1 c (10))
INSERT INTO foo VALUES ("0x2F")
INSERT INTO foo VALUES ("2e2")
CREATE CURSOR bar (f1 I)
APPEND FROM (DBF('foo'))
LIST
Thanks,
Aleksey.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform