Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert character into integer?
Message
 
 
To
25/01/2007 12:26:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01189249
Message ID:
01189431
Views:
8
Hi Tracy,

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.
I consider it a bug that CAST('0x2F' as int) returns 0 because '0x2F' is valid string representation of VFP hexadecimal literal.


>Thanks Sergey, Look at Borrislav's results, I just don't get it...
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform