Page 1 of 1
possible REPLACE issue
Posted: Wed Jan 15, 2020 4:54 pm
by kevclark64
I don't know if this is a bug or if I'm not doing something correctly, but using the Foxpro dialect the compiler throws an error on this line:
replace field1 with "value", field2 with "value",field3 with "value",field4 with "value"
The error is Parser: unexpected input 'with'
This works fine:
replace field1 with "value", field2 with "value",field3 with "value"
replace field4 with "value"
possible REPLACE issue
Posted: Wed Jan 15, 2020 9:28 pm
by Chris
Hi Kevin,
This looks like a preprocessor bug, it seems it only allows 3 "subcommands", while it is instructed to allow any number. You can see the commands in C:Program Files (x86)XSharpIncludedbcmd.xh
Problem logged, thanks for the report!
possible REPLACE issue
Posted: Wed Jan 15, 2020 9:35 pm
by FoxProMatt
Kevin - FYI... They use GitHub Issues to log some bug reports (but not all..).
Anyway, you can track/comment this one here:
https://github.com/X-Sharp/XSharpPublic/issues/300
possible REPLACE issue
Posted: Wed Jan 22, 2020 7:10 am
by robert
Kevin,
Kevin Clark wrote:I don't know if this is a bug or if I'm not doing something correctly, but using the Foxpro dialect the compiler throws an error on this line:
replace field1 with "value", field2 with "value",field3 with "value",field4 with "value"
The error is Parser: unexpected input 'with'
This works fine:
replace field1 with "value", field2 with "value",field3 with "value"
replace field4 with "value"
Fixed in next build.
Robert
possible REPLACE issue
Posted: Wed Jan 22, 2020 3:00 pm
by kevclark64
Great, thanks Robert.
Just to clarify, is there any limit in the number of REPLACEd fields on a single line? The VFP limit is 127.
Kevin
possible REPLACE issue
Posted: Wed Jan 22, 2020 4:48 pm
by robert
Kevin,
Kevin Clark wrote:Great, thanks Robert.
Just to clarify, is there any limit in the number of REPLACEd fields on a single line? The VFP limit is 127.
Kevin
I think the only limit is the amount of memory in your development computer.
Robert