The difference between extern and input - page 7

 
Vladimir Simakov:
The whole point is that extern was just not needed. A variable declared globally in any project file is accessible in all of its files. But why? Question to the creators.

To be able to compile a single file while working on it alone. Instead of jumping to a different file every time without waiting for the entire project to compile.

 
Igor Makanu:

example is needed, I tried to use extern in libraries - it doesn't workhttps://www.mql5.com/ru/forum/316795/page2#comment_12259472

That's because any global variable declared in a library won't be visible anywhere except in that library. They should also declare a global variable in a library and wonder why it cannot be seen anywhere else. #import is not #include

 
Dmitry Fedoseev:

So, any global variable declared in a library will not be visible anywhere except in that library. They should also declare a global variable in a library and wonder why it is not visible elsewhere. #import is not #include

extern was around at the time of MS DOS and everything was linked to compiled units

why are we having this conversation? - an admin came along and explained how and why the keyword extern was implemented in MQL. I wrote my opinion about exchanging with the help of global variables with the modifier extern - it's better not to use

 
Igor Makanu:

extern was around back in the MS DOS days, and everything linked up fine with compiled units

What's the point of this discussion? - an admin came along and explained how and why the keyword extern was implemented in MQL. I wrote my opinion about exchanging with the help of global variables with the modifier extern - it's better not to use it.

And what do libraries have to do with it? And what about units? - Units are subtleties of the compiler, which you don't need to know and even better not to know, so as not to draw the wrong conclusions. And what did the admin explain that wasn't clear yesterday? What is not clear is how you can not distinguish between the inlude and import. Incloud and imports were around during the reign of Gorokh, and they worked just as well as they do now.