Odd error

This forum is for general support of Xbase++
Post Reply
Message
Author
SteveV
Posts: 3
Joined: Fri Oct 28, 2011 1:09 pm

Odd error

#1 Post 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.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Odd error

#2 Post 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.
The eXpress train is coming - and it has more cars.

SteveV
Posts: 3
Joined: Fri Oct 28, 2011 1:09 pm

Re: Odd error

#3 Post 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...

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Odd error

#4 Post 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.
The eXpress train is coming - and it has more cars.

SteveV
Posts: 3
Joined: Fri Oct 28, 2011 1:09 pm

Re: Odd error

#5 Post 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!

Post Reply