Modules: Add "Main::" To Access Main Code Namespace
Posted: Mon Aug 14, 2017 10:18 am
I don't know if this is possible, but it would be nice if Modules could access variables, procedures, etc., from the main code via something like "Main::" — ie: make "Main::" act like if the main code was an implicit module.
This would allow to exceptionally access some vars or procedures declared in main code, meanwhile still avoiding namespace conflicts. It could make life easier in many situations, and it wouldn't break backward compatibility (except for cases where "Main" was declared as a module name).
Is this something that could be added to PureBasic?
This would allow to exceptionally access some vars or procedures declared in main code, meanwhile still avoiding namespace conflicts. It could make life easier in many situations, and it wouldn't break backward compatibility (except for cases where "Main" was declared as a module name).
Is this something that could be added to PureBasic?