Download MetaTrader 5
To add comments, please log in or register
Searching on MQL5.community is performed in all sections. Try it!
cyclops993
115
cyclops993 2013.12.12 18:55 

How do I declare an abstract base class in the new beta version of MQL4 or, similarly, in MQL5? The language doesn't seem to permit it, despite being heavily based on C++.

Alain Verleyen
Moderator
28627
Alain Verleyen 2013.12.12 19:01  
cyclops993:

How do I declare an abstract base class in the new beta version of MQL4 or, similarly, in MQL5? The language doesn't seem to permit it, despite being heavily based on C++.

https://www.mql5.com/en/forum/15509
Ovo Cz
2951
Ovo Cz 2013.12.12 19:01  
Lol, there is no abstract classes, nor methods, and no interfaces... Yes, you are right, it is much more inspired by C++ than JAVA.
cyclops993
115
cyclops993 2013.12.12 19:11  
Ovo:
Lol, there is no abstract classes, nor methods, and no interfaces... Yes, you are right, it is much more inspired by C++ than JAVA.

(As I think you know, C++ does have abstract base classes. So do Java, the .NET languages, Python etc etc etc).

Thanks for the confirmation. The documentation doesn't explicitly say "there are virtual functions but no abstract functions", but your and angevoyageur's answers appear to be definitive. Just wanted to check.

Ovo Cz
2951
Ovo Cz 2013.12.12 20:09  
cyclops993:

(As I think you know, C++ does have abstract base classes. So do Java, the .NET languages, Python etc etc etc).

Thanks for the confirmation. The documentation doesn't explicitly say "there are virtual functions but no abstract functions", but your and angevoyageur's answers appear to be definitive. Just wanted to check.

No problem, I was snooping for the abstract functions a few days ago. I have been trying to find the most comfortable way of coding for me, and I am converging slowly.. For example I still did not find a way how to simulate packages.

The very uncomfortable thing (in this beta stage) is, that if something does not work, it still may be a bug, or a feature. You are never sure.

/
To add comments, please log in or register