Syntax

 

Hello, 

On the below code 

CTrade::CTrade(void) : m_async_mode(false),
                       m_magic(0),
                       m_deviation(10),
                       m_type_filling(ORDER_FILLING_FOK),
                       m_log_level(LOG_LEVEL_ERRORS)
  {
   SetMarginMode();
//--- initialize protected data
   ClearStructures();
//--- check programm mode
   if(MQL5InfoInteger(MQL5_TESTING))
      m_log_level=LOG_LEVEL_ALL;
   if(MQL5InfoInteger(MQL5_OPTIMIZATION))
      m_log_level=LOG_LEVEL_NO;
  }

 I dont understand the syntax. This is the constructor for that Trade class, the variables are declared under protected , but I dont undestand the syntax. the value between brackets is the asigned value at initiation?

 Also what is the  " : " meaning ?

I know that is stupid question, but kindly advise aabout this syntax, or at least point me where to read. Thank you.

 
It marks the beginning of an initialization list for the class constructor.
Documentation on MQL5: Language Basics / Data Types / Structures, Classes and Interfaces
Documentation on MQL5: Language Basics / Data Types / Structures, Classes and Interfaces
  • www.mql5.com
Structures, Classes and Interfaces - Data Types - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Fernando Carreiro #: It marks the beginning of an initialization list for the class constructor.
Thank you very much