Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Substr() not working correctly
Message
From
17/09/1999 00:17:19
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
 
To
16/09/1999 16:49:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00265612
Message ID:
00265749
Views:
19
>The following worked:
>
>Replace All store Right(store,3)
>
>also
>
>REPLACE ALL store with PADL(alltrim(str(VAL(store))),3,"0")

One thing worth mentioning is that STORE is a reserved word in VFP (even more seriously, a command name). In general it's extremely bad practice to name fields, variables etc. the same as reserved words. It can make VFP's command parser hiccup.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform