Mistype in the documentation

 

Hi, I don't know where to send it, so I'm posting it here.

In this page, https://docs.mql4.com/convert/stringtointeger

The explanation says:  "into number of int (integer) type." and the return value is supposed to be long.

And on a personal note, I think those functions are bugged...
 

 

:)))

Do you want function string toLong? 

 

No hahaha, I just noticed it when taking a look at those.

I will soon open a post with a problem I'm having when using the functions StrToDouble/StringToDouble, because I'm having such a weird issue with those...

 
Flood19:

Hi, I don't know where to send it, so I'm posting it here.

In this page, https://docs.mql4.com/convert/stringtointeger

The explanation says: "into number of int (integer) type." and the return value is supposed to be long.

And on a personal note, I think those functions are bugged...

I will soon open a post with a problem I'm having when using the functions StrToDouble/StringToDouble, because I'm having such a weird issue with those...

  1. This is a user's forum not Metaquotes.
  2. Use the link button  Use the link button
  3. I agree it was misnamed; in my standard include, I wrote:
    /// What `StringToInteger()` actually returns.
    #define StringToLong(text) StringToInteger(text)
    
    Then I only use the define and then the cast makes sense:
    int value = (int) StringToLong(text);

  4. "functions are bugged" "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
  5. "having such a weird issue" Same thing. Print the argument and the return value and find out why.
 
Flood19:

No hahaha, I just noticed it when taking a look at those.

I will soon open a post with a problem I'm having when using the functions StrToDouble/StringToDouble, because I'm having such a weird issue with those...

StrToDouble/StringToDouble - unfortunately those "identical" pairs may behave differently, as I painfully learnt with StringSetChar/StringSetCharacter.