Download MetaTrader 5
To add comments, please log in or register
MQL5 library has more than 1500 apps already. Contribute your own one!
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
13599
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