Is there a way to introduce a variable which is defined in the main program and is seen from external modules.
Sure. See our.
What is a drawback of such a variable
There is extensive literature out there, for example search for why are global variables bad. In short: global state makes programs harder to understand, to debug, can cause problems with recursion and concurrency, and is often a sign of bad encapsulation.
In reply to Re: globally seen variable
by moritz
in thread globally seen vairable
by vit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |