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

This forum is meant for questions and discussions about the X# language and tools
Post Reply
RolWil
Posts: 68
Joined: Mon Jul 18, 2022 3:16 am

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

Post 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
  
User avatar
robert
Posts: 4518
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

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

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
RolWil
Posts: 68
Joined: Mon Jul 18, 2022 3:16 am

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

Post 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




 
Post Reply