NULL string comparison - page 2

 
JensenKarl:
I am also confused about the coding part, if it is initializing zero then how could it get the proper answer.
Did you look at my sample code ?
 
mt4forum: But let's not further dive into my intentions.
Since your question makes no sense AND raptoruk already answered you, asking you the why is the only way to continue to help you. If you don't want to answer the why (your intentions) then I don't intend to devote any more of my attention to your intentions.
 
WHRoeder:
Then what are
ERR_NOT_INITIALIZED_STRING4008Not initialized string.
ERR_NOT_INITIALIZED_ARRAYSTRING4009Not initialized string in array.
An empty string ("") is not the same as a null string (uninitialized) Try running RaptorUK's test.


Indeed, I was wrong again :) Then the docs are wrong and the string gets implicitly initialized rather when used for the first time than when declared.

 
WHRoeder:
Since your question makes no sense AND raptoruk already answered you, asking you the why is the only way to continue to help you. If you don't want to answer the why (your intentions) then I don't intend to devote any more of my attention to your intentions.

I'm sorry William, I did not mean to sound blocking in any way. It's just that I thought, that I had described my problem in detail already.

So let me try it this way:

The timeseries functions in MQL4 allow to pass NULL as the parameter for Symbol.

In this case, the current symbol is used by the function.

For consistency purposes I want my functional layer to do the same: If NULL is passed as first parameter, the function should replace it by the current symbol.

For that I need to test, if the parameter is NULL.

RaptorUK's code example has given the answer: The test for NULL, which I was looking for, is str == "0".

Thanx.

 
mt4forum: The test for NULL, which I was looking for, is str == "0".
Wong. "0" is a string, one character long, containing the character zero. It is NOT NULL.
 
WHRoeder:
Wong. "0" is a string, one character long, containing the character zero. It is NOT NULL.
NULL gets typecast to "0" if you use it as a string parameter when calling a function, but yes, NULL is an int value 0.