fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Use of global variables

Use of global variables 5 months 3 weeks ago #1

  • Intexso
  • Intexso's Avatar Topic Author
  • Offline
  • Posts: 63
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.

Use of global variables 5 months 3 weeks ago #2

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.

Use of global variables 5 months 3 weeks ago #3

  • Intexso
  • Intexso's Avatar Topic Author
  • Offline
  • Posts: 63
Yes, how simple it can be.
Thanks
Eric

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

  • Page:
  • 1