PLO - page 5

 
C-4:

The need to use OOP arises when the program becomes larger than "Hello word".

In general, I've known MQL4 for several years, and I'm still amazed by its wretchedness. The fourth MQL is as far away as a star from the capabilities of classical C. In MQL5 the developers decided to go forward. The number of features has increased and programming has become easier. The language has become more complex, yes, but the product was not made for school students.

Basic and Pascal have always been used for learning at school/university (the second one is present in all self-respecting educational institutions)...
 
Interesting:
Basic and Pascal have always been used to study at school/university (all self-respecting educational institutions have the latter)...
C and Java and Asm were shoved at us, but it was no use...)
 
FoxRex:
Lists, trees, graphs, it is not possible to have pointers in MQL4.
What are lists, trees, and graphs ... explain please. ( I know what a tree is, but I'm afraid it's not the tree with leaves and cones)
 
gumgum:
C and Java and Asm were shoved at us, but it's no use...).

This is already professional, I'm talking about programming basics (in today's terms it would be computer science lessons).

Although C in principle can also be studied at basic level, for example instead of Basics...

 
maryan.dirtyn:
What are lists, trees and graphs ... explain it to me. (I know what a tree is, but I'm afraid it's not a tree with leaves and cones)
It's better not to think about it - do you personally need it...? :)
 
Interesting:
It's better not to think about it - do you personally need...? :)
Who knows) maybe it will substantially simplify the simple EA scheme on Dummies ;) ... at least in general terms (personal interest, we all have to work with mql5) ...
 
https://www.mql5.com/ru/articles/36 here is a bit about lists. Trees are roughly what you provide, a branching structure. Here's about graphs and trees http://www.intuit.ru/department/pl/plpascal/11/
Когда нужно использовать указатели в MQL5
Когда нужно использовать указатели в MQL5
  • 2010.03.25
  • MetaQuotes Software Corp.
  • www.mql5.com
Все объекты в MQL5 по умолчанию передаются по ссылке, но есть возможность использовать и указатели объектов. При этом есть опасность получить в качестве параметра функции указатель неинициализированного объекта. В этом случае работа программы будет завершена критически с последующей выгрузкой. Автоматически создаваемые объекты как правило такой ошибки не вызывают, и в этом отношении они достаточно безопасны. В этой статье мы попробуем разобраться в чем разница между ссылкой и указателей, когда оправдано использование указателей и как написать безопасный код с использованием указателей.
 
In the Standard Library, there is also a section on Classes for organising data
 

Question. The Reference Manual states that.

Переменная типа класса (объект) может передаваться как по ссылке, так и по указателю. Указатель как и ссылка служит для того, чтобы получать доступ к объекту.  

...if we want a function to return an object, we can return a pointer to that object in the form of GetPointer(this).

Trying to use the object as a parameter of a third-party function, i.e. trying to pass the object into the function. In both cases (both when passing an object by reference and when passing by pointer) the compiler doesn't swear. Is there any difference between these two methods of passing an object to a function, or can they be used with equal success? It's not necessary to return an object (a pointer to an object).

 
Yedelkin:

Question. The Reference Manual states that

Trying to use an object as a parameter of a third-party function, i.e. trying to pass an object into a function. In both cases (both when passing an object by reference and when passing by pointer), the compiler doesn't swear. Is there any difference between these two methods of passing an object to a function, or can they be used with equal success? It's not necessary to return an object (a pointer to an object).

There is no difference as long as you don't explicitly refer to the object by reference as a pointer. Try it yourself and see the article When to use pointers in MQL5
Reason: