Hello guys,
I have some code where str2int function return incorrect value with minus sign. It doesn't match the parameter and also it adds "-" sign. What does that mean? I'm sure that it accepts the variable of the string type.
One of the examples:
str2int("2711838385");
it returns integer = -1583128911
never faced such things before.
The customer uses str2int64 instead of str2int.
yes. figured it out by myself already. Thanks.
Use str2int64 instead.
int is a 32 bit integer, with range of -2,147,483,647 to 2,147,483,647. Your value is higher and the compiler do a overflow in the memory allocated.
resolved by myself. Sorry for disturbance.
I got that 2711838385 is too big for int but str2int64 doesn't help also. It proceeds to return minus value.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156