Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug in VFP?
Message
 
To
01/11/2005 15:33:31
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01064173
Message ID:
01064180
Views:
15
Hope the below will make it clear for you:
clear
lcTest = "  0123"
lnTest = VAL(lcTest)
?lntest
lcTest = ALLTRIM(STR(lnTest))
?lctest
lnTest = VAL(lcTest)
?lntest
?STR(lnTest), LEN(STR(lnTest))
?"|" + STR(lnTest) + "|"
>Execute the following code:
>
>lcTest = "  0123"
>lnTest = VAL(lcTest)
>lcTest = ALLTRIM(STR(lnTest))
>lnTest = VAL(lcTest)
>?"|" + STR(lnTest) + "|"
>
>
>Shouldn't the result be |0123|? I can't see how it remains | 0123| after I change it to a string, perform an ALLTRIM on it, and then change it back to a numeric value.
Previous
Reply
Map
View

Click here to load this message in the networking platform