How the Program Flow?

Back to topics list  | 1 2 To post a new topic, please log in or register
avatar
80
chuale 2015.05.27 10:54 #
 

Dear WHRoeder,

 

As I am new to MQL4 so sometimes  I will ask too basic questions, hope you dont mind. I did compile the progeam and I dont know why it display an error.

avatar
65
2cent 2015.05.27 13:22 #
 
chuale:

As I am new to MQL4 so sometimes  I will ask too basic questions, hope you dont mind. I did compile the progeam and I dont know why it display an error.

It displays an error because it seems that "not all control paths return a value" is an error now and not a warning anymore. - Just put a  

return 0;

statement as the last statement in start().

In general, if a function is declared and/or defined to return a value (non void function), then it has to do so.

And if you want to code in mql you basically need to know how to code in c++, since mql is a subset of c++, where all of the program flow, declarations and definitions etc are virtually the same.

Read the book: https://book.mql4.com

 

Back to topics list   | 1 2  

To add comments, please log in or register