Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Better way to do int(val(alltrim(cvar)))?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00105555
Message ID:
00105571
Views:
30
Gil,

You don't need the alltrim(), val stops at the first nonnumberic character. The int() is only needed if it's possible there is a decimal point and digits after it.

>Is there a Better way to do int(val(alltrim(cvar)))?, as in:
>
>cvar = '94567 '
>nvar = 'int(val(alltrim(cvar)))'
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform