The difference between extern and input

 
Hi all! I've read the documentation, but don't see any difference as such.... is there any difference at all?
 
Maksim Neimerik:
Hello all! I've read the documentation, but I don't see a difference as such... Is there one at all?

There's no difference, you can see it with the naked eye, and if you read it, it's no difference at all:

input

extern

Read it, compare it.

Документация по MQL5: Основы языка / Переменные / Input переменные
Документация по MQL5: Основы языка / Переменные / Input переменные
  • www.mql5.com
указывается перед типом данных. Изменять значение переменной с модификатором input внутри mql5-программы нельзя, такие переменные доступны только для чтения. Изменять значения input-переменных может только пользователь из окна свойств программы. Внешние переменные всегда переинициализируются непосредственно перед вызовом OnInit().   Существует...
 
Artyom Trishkin:

There's no difference, you can see it with the naked eye, and if you read it, it's no difference at all:

input

extern

Read, compare.

I read about extern, it's just amazing what inhuman language the MK's started to write the help in.

 
Dmitry Fedoseev:

I read about extern, it's amazing what non-human language the MCs started to write the help in.

the whole help is written in a non-human language, the help implies that you are already familiar with basic programming principles,

even if you're confused by it.

I personally found it very difficult to understand the work, the help was handled by a person clearly not a fan of humanity

 
Fast235:

all help is written in non-human language, this help implies that you are already familiar with basic programming principles, even if you are perplexed by it, then

And those who are not familiar with the basic principles of any programming language should read something "for dummies" or go to a course.

 
Dmitry Fedoseev:

I read about extern, it's amazing what inhuman language the MCs started to write the help in.

Everything is clear about input. About extern - there, as for me, first you can declare variables with the same type and identifier in different files connected to the project, and then - it turns out that you can not declare them so. This is certainly a three-storey impressionism...

 
Alexey Viktorov:

And those who are not familiar with the basic principles of any programming language should read something "for dummies" or go to a course.

I have already gone through it, but I still have a bad impression of mq's not very good attitude towards users.

 
Maksim Neimerik:
Hi all! I've read the documentation, but don't see any difference as such.... is there any difference at all?

there is:
1) extern only works in mql4.
2) comments after input will appear in input parameters instead of input variable name
input int ma_period = 20;
- it will say "ma_period".
input int ma_period = 20; // MA period
- it will be written "MA period".
to be exactly like that in mql4, the strict compilation mode is needed #property strict.
This trick is absent with extern.
3) Extern variables can be changed in code like anyglobal variables, input cannot.

Initially, there was only mql4 and extern, no input was present, neither was OOP in mql4.
Then mql5 was created and input was immediately added, because mql5 in general was oriented specifically at OOP.
About 2-3 years ago, mql4 was upgraded with many features from mql5, including input.

 
I agree with the previous speakers) but is there any way you can explain on your fingers what the difference is? Be my guest! Well, it's not always possible to understand the reference...
 
Fast235:

go to a C course and then go to mql, I went through that, but it left a residue, not a very good attitude to users at mq

I don't know. For me all the documentation is understandable. If there are difficulties somewhere, they disappear after some experiments.

But if I'm not familiar with bitwise operations, I can read any article you want... I won't get anything out of them. I couldn't understand anything about flags and flag sets until Artyom explained them to me in a voice.

 
Alena Lysenkova:

there are:
1) extern only works in mql4.
2) comments after input will appear in input parameters instead of input variable name
input int ma_period = 20;
- it will say "ma_period".
input int ma_period = 20; // MA period
- it will be written "MA period".
mql4 needs the strict compilation mode #property strict to be exactly like that.
3) extern variables can be changed in the code like any global variables, input cannot.

Well, you can! Thank you Alyona!

Reason: