Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange REPLACE
Message
From
21/01/2004 05:57:15
 
 
To
21/01/2004 05:48:08
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00868883
Message ID:
00868902
Views:
17
Hi Agnes

No, I think we understood you very well. Terry's point was a remark to my comment that the syntax checking has been more and more strict with each version. However in my first response to you I forgeot a NOT, so my sentence should have been "However, I would not rely on it NOT being 'fixed' by MSFT". Since the comma(s) is expected, new version may or may not raise errors if you omit them.

I hope this message clear up the misunderstandings.

Tore

>Terry, Tore,
>
>I have the feeling that you misunderstand me.
>This is not checked yet. REPLACE without comma works with VFP8 SP1. There is no change in it. I simple found it looking on that REPLACE for other reasons.
>
>Agnes
>>Yeah, in VFP3 I got away with (inadvertantly) not putting the ";" at the end of a line of LOCAL declarations, when the list went onto a new line. When I converted the project to VFP7 I couldn't believe the number of syntax errors I got (and had got away with), all over the place, in different forms. Syntax checking has been tightened up between the 2 versions.
>>
>>Terry
>>
>>>Hi Agnes
>>>
>>>Nice catch. However, I would not rely on it being 'fixed' by MSFT. One of the things that have changed in the last versions of VFP is the checking for correct syntax. Also I think the comma makes it more readable.
>>>
>>>>Hi,
>>>>
>>>>looking in some year old code I found that that REPLACE is not working as expected or documented. It seems not to be harmfull.
>>>>
>>>>
>>>>Help states:
>>>>REPLACE FieldName1 WITH eExpression1 [ADDITIVE]
>>>> [, FieldName2

>>>>
>>>>What I have found is that the comma is optional. The original statement was like:
>>>>
>>>>REPLACE;
>>>> Field1 WITH Value1;
>>>> Field2 WITH Value2
>>>>
>>>>
>>>>Testing around I found that
>>>>
>>>>REPLACE Field1 WITH Value1 Field2 WITH Value2
>>>>
>>>>is working fine too.
>>>>
>>>>The first example works at least since VFP 6.0 all the line up.
>>>>
>>>>Agnes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform