If I declare a global in one package:
package package1;
let int global = 3;
How do I use it in another package
package package2;
import package1;
let int another_global = global * 3;
It doesn't seem to work, only methods do.
The workaround is to use the "fun" class to access the global variable, in your case: package1.fun.global
Log in to post a comment.
If I declare a global in one package:
package package1;
let int global = 3;
How do I use it in another package
package package2;
import package1;
let int another_global = global * 3;
It doesn't seem to work, only methods do.
The workaround is to use the "fun" class to access the global variable, in your case: package1.fun.global