Download MetaTrader 5

OOP basics

To add comments, please log in or register
NTFS
650
NTFS 2013.04.03 06:06 

Hello!

I used to program in other OOP language and there is a nice feature there that allows to distinguish between global functions and functions of the current class instance.

I mean, let say you have a class named CClass. Then inside the class code you need to call 1) global function named function1 and private CClass function named function1. Then you would call at first function1 and then me.function1

Also, a "me notation" is simpler to understand when you read a code. 

If that is possible somehow then probably it would also be handy to type me. Ctrl+Space and Metaeditor gives you possible methods and properties for the class instance. 

So, could anyone comment on whether smth of this kind is implemented in MQL5?

Thank you!

 

NTFS
650
NTFS 2013.04.05 17:43  
ns_k:

Hello!

I used to program in other OOP language and there is a nice feature there that allows to distinguish between global functions and functions of the current class instance.

I mean, let say you have a class named CClass. Then inside the class code you need to call 1) global function named function1 and private CClass function named function1. Then you would call at first function1 and then me.function1

Also, a "me notation" is simpler to understand when you read a code. 

If that is possible somehow then probably it would also be handy to type me. Ctrl+Space and Metaeditor gives you possible methods and properties for the class instance. 

So, could anyone comment on whether smth of this kind is implemented in MQL5?

Thank you!

 

Post here in case someone else find it interesting. Use this. notation.

Thanks! 

To add comments, please log in or register