Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Addbs adds no backslash
Message
From
23/10/2006 18:40:30
 
 
To
23/10/2006 14:48:11
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01163916
Message ID:
01164012
Views:
13
>>I have noticed that addbs() does not add a backslash if given an empty path. I'd expect a backslash even in that case, creating a reference to the root! I can't imagine that this was done by design. Who's at vault?
>
>empty to empty, it is correct.
>
>within VFP an "empty path" is "the default directory",
>and ADDBS() must preserve it.
>
>
>? FILETOSTR("filename.filetype")
>* this must to be equal
>? FILETOSTR(ADDBS(JUSTPATH("filename.filetype"))+JUSTFNAME("filename.filetype"))
>
Why on earth should the second case be equal to the first one?! The addbs() function is meant to eventually modify the string. Empty to empty is NOT the correct handling, because in that case the function does not do what it promisses, that is, to add a backslash.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform