Discussing the article: "From Basic to Intermediate: Variables (III)"

 

Check out the new article: From Basic to Intermediate: Variables (III).

Today we will look at how to use predefined MQL5 language variables and constants. In addition, we will analyze another special type of variables: functions. Knowing how to properly work with these variables can mean the difference between an application that works and one that doesn't. In order to understand what is presented here, it is necessary to understand the material that was discussed in previous articles.

In the previous article "From Basic to Intermediate: Variables (II)", we discussed and explained how to use static variables in our code. Such variables allow us to avoid unnecessary use of global variables. So, we are done with the main variables. However, there remains the question of the type of data that each variable can contain, which still has some relevance to this problem. I will not consider this aspect within the framework of the topic of variables. We will talk about this in a separate topic.

However, if we have already talked about local and global variables, how and why to declare a variable as a constant, and even how to use static variables, what else is left to say on this topic? Although many people don't think so, there is a special type of variable that can often be considered a constant, but it is still a special type of variable. I am talking about functions. A function is a special type of variable, although, in principle, many programmers do not think so.

Author: CODE X

 
MetaQuotes:

Check out the new article: From Basic to Intermediate: Variables (III).

Author: CODE X

After I have just read the title "Special variables: Functions", I thought that the article would discuss the special type "function pointers".
 
amrali # :
After I have just read the title "Special variables: Functions", I thought that the article would discuss the special type "function pointers".

This will be discussed later in another article created specifically for this purpose. Since in order to understand why to use pointers to functions, it is first necessary to understand another type of concept, which is how to deal with events. 🙂👍