Download MetaTrader 5

How to write a function like Print(...)

To add comments, please log in or register
fridayda13
10
fridayda13  

Hi,

I want to know how the Print(...) function was coded, because I want to write such a function myself,

which takes infinite number of parameters.

Does anyone know? 

Stanislav Korotky
18241
Stanislav Korotky  
You can't do that directly in MQL. But you can write a function with several last parameters having default value. Also you may define multiple functions with the same name but different parameter list.
fridayda13
10
fridayda13  
Stanislav Korotky:
You can't do that directly in MQL. But you can write a function with several last parameters having default value. Also you may define multiple functions with the same name but different parameter list.
Thanks!
To add comments, please log in or register