fbpx

Use of global variables

More
3 months 3 weeks ago #1 by Eric Boomsma
Use of global variables was created by Eric Boomsma
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

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks ago #2 by Robert van der Hulst
Replied by Robert van der Hulst on topic Use of global variables
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

XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks ago #3 by Eric Boomsma
Replied by Eric Boomsma on topic Use of global variables
Yes, how simple it can be.
Thanks
Eric

Please Log in or Create an account to join the conversation.