Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug in VFP?
Message
From
01/11/2005 16:04:23
 
 
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:
01064197
Views:
19
This message has been marked as the solution to the initial question of the thread.
>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.

Nope, no bug. STR() defaults to a string that's 10 characters wide, right justified (left space padded).
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform