Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CLR and VFP
Message
From
31/08/2000 10:29:19
 
 
To
31/08/2000 03:12:47
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00409695
Message ID:
00411260
Views:
17
>>REPLACE (lcField) WITH lvValue FOR (lcExpression)
>
>This does not work. You can't use FOR (lcExpression).

Woops. I could have sworn that worked when I tested it previous to posting. Sorry.


>A REPLACE command is not the equivalent of a SQL command.

Agreed, but this is a perfect example of a missing feature in VFP- one that takes expressions instead of names:

lnReplacedCount = REPLACE(lcField, lvValue, lcScope, lcWhile)

We have both a SEEK command and a SEEK function, why not a REPLACE command and a REPLACE function?

The reason other languages don't need macro substitution is because they have commands that do the stuff that VFP programmers use macros for. BTW, in my 3+ years of programming in VFP, I've made it the whole time without using a macro in any clause of a REPLACE statement. Must not be that vital.


>What I'm trying to say is, without macro substitution you'll loose one of the most powerfull and valuable VFP features (maybe because many other languages don't have this).

It's only valuable now because we're trapped into using it. It's a crutch that we're forced to use because we're otherwise crippled. Not to mention, its very presence encourages bad and unreadable code.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform