xsharp.eu • Harbour Dialect project: issue with “RESTORE FROM” command and membvar.xh
Page 1 of 1

Harbour Dialect project: issue with “RESTORE FROM” command and membvar.xh

Posted: Sun Jul 02, 2023 2:12 pm
by RolWil
Hi all,

my project dialect is Harbour; I’ve added the following references:
  • XSharp.Core
  • XSharp.RT
I’ve checked:
  • Enable MEMVAR support
  • Enable undeclared variable support
  • Implicit casts and conversions
  • Treat missing types as USUAL
 Problem: the following code results in an “unexpected input 'FROM' error:  

Code: Select all

RESTORE FROM ("BFST") ADDITIVE
 The pre-processed code shows that the RESTORE FROM command was not translated/substituted.If I manually do so, i.e. replace the “RESTORE FROM” with    “MRestore( "BFST")”, the code compiles without error.

Question: Is there something I need to do to ensure the memvar.xh include file is pulled in (I tried “ #include memvar.xh”) ?

Long term, I will replace all use of .MEM files with either a single-record table or, as I’ve done with some of the independent modules I’ve converted so far, JSON files. Legacy .MEM files have been a somewhat primitive structure and cause for issues in multi-user environments.

Thanks folks.
Roland
  

Harbour Dialect project: issue with “RESTORE FROM” command and membvar.xh

Posted: Sun Jul 02, 2023 4:22 pm
by robert
Roland,

Code: Select all

#include "memvar.xh" 
should do it.
I see that this header file is not included automatically.
If you want to include it in all your source files, then you can add that line to the file customdefs.xh in the XSharpInclude folder.
I will make sure that this file is included automatically in the future.

Robert

Harbour Dialect project: issue with “RESTORE FROM” command and membvar.xh

Posted: Mon Jul 03, 2023 12:24 pm
by RolWil
Thank you Robert,

I did try to  manually pull the include file (see above), BUT .... I did like so #include memvar.xh, instead of like so: #include "memvar.xh"  :)  Those pesky quotes!

Cheers
Roland