Download MetaTrader 5
To add comments, please log in or register
Join MQL5 Cloud Network affiliate program and make money!
Guillermo
75
Guillermo 2016.03.11 11:03 

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...
 

Vasyl Nosal
18212
Vasyl Nosal 2016.03.11 11:45  

:)))

Do you want function string toLong? 

Guillermo
75
Guillermo 2016.03.11 11:50  

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...

whroeder1
13619
whroeder1 2016.03.11 12:43  
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.
Ovo Cz
2951
Ovo Cz 2016.03.11 13:01  
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.
/
To add comments, please log in or register