Page 1 of 1

Odd error

Posted: Tue Mar 26, 2013 8:23 am
by SteveV
Hello,

I'm having a very strange error when trying to convert an old clipper app to xBase 1.82.

I'm getting XBT0200 syntax errors on any statment with a 'REPLACE' command in it, for example;

REPLACE Database->DataField WITH 'abc'

I noticed that if i remove the 'Database->' part of the code, then it will compile;

REPLACE DataField WITH 'abc' // works!

I have other apps that I've previously converted using the same xBase dlls, and i've recompiled them as a test - no problem. I must be missing something but can't seem to find anything different from this particular app and the ones that work.

Any ideas where to look would be greatly appreciated!

Thanks - Steve V.

Re: Odd error

Posted: Tue Mar 26, 2013 8:47 am
by rdonnay
It is very unusual to have a database named database.dbf.

My first thought was that Xbase++ considers DATABASE to be a reserved key word even though it isn't listed as one in the docs.

However, after writing a small test program, this compiled just fine for me in Xbase++ 1.82.

I need more information.

Post a snippet of code that will not compile for you.

Re: Odd error

Posted: Tue Mar 26, 2013 8:53 am
by SteveV
I'm sorry I guess i wasn't very clear with my original post. I just used the word database as an example. I have NO databases by that name.

It doesn't matter what the name of the database is;

REPLACE Inventory->Description WITH 'itemname'
REPLACE SalesRep->Name WITH 'Steve'
REPLACE Account->Number WITH '12345'

They all fail...

Re: Odd error

Posted: Tue Mar 26, 2013 9:17 am
by rdonnay
This all works fine for me.

My best guess is that you have an #include file that has a REPLACE command in it which is overriding the default in Alaska's STD.CH.

Re: Odd error

Posted: Tue Mar 26, 2013 10:45 am
by SteveV
Even worse - for some reason there was an old copy of the clipper std.ch sitting in the source code folder! You idea put me on the right track though - thanks!