Download MetaTrader 5

How to print the number of the line?

To add comments, please log in or register
Register as a seller and start offering your signals!
Marcos Maia
159
Marcos Maia 2015.11.23 13:30 

Hello,

 

I would like to print the number of the line in my code. For example

if (condition1 && condition2){

Print("Error in line ",GetLineNumber());

}

 

where the function GetLineNumber() is a function the gives the number of the line where it is called.

 

Is there such a function out there?  Any idea on how to construct this function?

 

 Best regards,

Daniel 

whroeder1
14480
whroeder1 2015.11.23 13:51  
There is no such function; there is a macro: Predefined Macro Substitutions - MQL4 Documentation
Marcos Maia
159
Marcos Maia 2015.11.23 14:20  
WHRoeder:
There is no such function; there is a macro: Predefined Macro Substitutions - MQL4 Documentation
Thanks.
To add comments, please log in or register