Cloud Protector Bug?

 

Compiling the code below with MQL5 Cloud Protector on MetaEditor build 2302 fails with a message "protecting finished with error 'unknown'  EX4 write error".

void f(string s = NULL)
{
  Print( StringLen(s) );
}

The code below works.

void f(string s = "")
{
  Print( StringLen(s) );
}
 
Don't use NULL.
  1. On MT4, you can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, iCustom does, MarketInfo does not. OrderSend does not.
  2. Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
  3. Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
  4. MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
 

Thank you for your answer, William.

Cloud Protector should be able to compile a code that passed MetaEditor's compiler. If not, error message should tell what's wrong with the code at least.

So I'm looking for this solved on next update.

Reason: