How to print the number of the line?

Back to topics list To post a new topic, please log in or register
avatar
4
marcosdnm 2015.11.23 14: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 

avatar
12988
WHRoeder 2015.11.23 14:51 #
 
There is no such function; there is a macro: Predefined Macro Substitutions - MQL4 Documentation
avatar
4
marcosdnm 2015.11.23 15:20 #
 
WHRoeder:
There is no such function; there is a macro: Predefined Macro Substitutions - MQL4 Documentation
Thanks.
Back to topics list  

To add comments, please log in or register