Discussion of article "OOP in MQL5 by Example: Processing Warning and Error Codes"

 

New article OOP in MQL5 by Example: Processing Warning and Error Codes is published:

The article describes an example of creating a class for working with the trade server return codes and all the errors that occur during the MQL-program run. Read the article, and you will learn how to work with classes and objects in MQL5. At the same time, this is a convenient tool for handling errors; and you can further change this tool according to your specific needs.

Before we start developing, let's get acquainted with some features of the OOP, which will be used in this article. Of course, we will use structures and classes. These are the basics of object oriented languages. What is the structure, what is the class and how do they differ?

A structure is a construction that allows containing a set of variables and functions of different types (except void).

A class as well as the structure is a set of data fields. But a class is a more complicated and "Flexible" construction. Classes are the basic concept of the OOP.

Author: KlimMalgin

 

cool =)

I've been waiting for such an article for a long time =)

already from the first words it is clear that this article is for dummies =)

 
Kettle for Dummies.
 

Wonderful article. Thank you!

 
I understand that the Check method catches only errors, it does not catch return codes?
 
We need to introduce exceptions into the language, then it will be useful. While at any critical rantime error the programme crashes, and no classes like the one described above will save the situation.