Sign in to follow this  
Followers 0
cappy2112

Does global scope work across files?

3 posts in this topic

If I have file1.au3, which includes file2.au3

and a global variable has been declared before the inclusion of file2 as in..

Global $G_SomeVar="test"

include <file2.au3>

Will file2 be able to read and modify the global var?

Share this post


Link to post
Share on other sites



Is it so complicated that you can't just write code to test it? I mean, you wrote half of it already.

Share this post


Link to post
Share on other sites

Is it so complicated that you can't just write code to test it? I mean, you wrote half of it already.

well, I have a situation where the second file doesn't seem to be able to read the value from the first file

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0