xsharp.eu • Use of global variables
Page 1 of 1

Use of global variables

Posted: Thu Sep 27, 2018 5:44 pm
by Intexso
Hello,

I my VO application I am using some global variables.

For example I have in Xide an application. In the file 'Global Variables.prg' I declare: GLOBAL lShare := FALSE as LOGIC.

In the same application, but another file I am using the global variable lShare.

The compiler gives the error:
error XS0246: The type or namespace name 'lShare' could not be found (are you missing a using directive or an assembly reference?) 8543,18 Database.prg


Do I have to declare a using directive? And if, what must be the directive name?

Thanks in advance.

Eric

Use of global variables

Posted: Thu Sep 27, 2018 5:50 pm
by robert
Eric,

I think your code looks like this:
IF lShare.AND. another condition.

VO has no problem with that but X# thinks that you are accessing the AND property in the lShare class.
If you put a space between lShare and .AND. then it should compile without problems.

Robert

Use of global variables

Posted: Thu Sep 27, 2018 7:34 pm
by Intexso
Yes, how simple it can be.
Thanks
Eric