What is the difference between NULL and "" ?

 
Can someone tell the difference between
NULL
and
""
Thank you in advance.
 

NULL is basically no value as far as I understand when a string variable is assigned.

Note


string a=NULL;
Print(a=="");

‌Will not return true

whereas


string a=NULL;
Print(a==NULL);

‌and


string a="";
Print(a=="");

‌will both return true

 
I would recommend to avoid NULL in MQL completely unless you have tested behaviour for the particular datatype. It is implemented inconsistently, for string it means an uninitialised string, while for integer it means either an uninitialised integer or zero, for object pointers it means uninitialised or void objects however not the destroyed pointers.
 

I agree, (except for pointers where you specifically check for NULL,) don't use it.

You can only use NULL in calls where the documentation specifically mentions it, and those are mostly a substitution for _Symbol.‌

Reason: