Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function not behaving as documented
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00859615
Message ID:
00859879
Views:
21
>>Just checked FPD 2.5, still can't replicate it, and I used the same values that I did in 8.0.
>
>I can't replicate behaviour described in vfp6 either. I did notice something a little odd. Try: padl("12345678",6) and it returns "123456".
>
Einar,

Yes, I noticed that too in both VFP 8.0 and FPD 2.5. To me, this is the expected behavior. You're telling the function to return a 6 character length string and this is what it does.

The workaround is quite simple, if you want a string at least six characters long, but don't wish to truncate it at six.
m.result = PADL(m.result, MAX(LEN(m.result), 6))
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform