Hi, Bram,
Another oddity I've recently discovered is that str2nr won't accept an
explicitly
positive number, such as '+3'.
This is unexpected. Would you be willing to adjust the behaviour? I can't think
of
any negative/compatibility-breaking side effects this would have, but I also
don't
On 23 Jun 2008, at 18:34, Gautam Iyer wrote:
Doesn't that allow '+-3' ?
This seems to go unnoticed in some other languages too (e.g. Python).
I assume that's because they support unary '+' as an operator. It's
not part of the numeric constant:
print +(1+2)
3
print ++(1+2)
3
On 23/06/08 19:28, Ben Schmidt wrote:
Hi, Bram,
Another oddity I've recently discovered is that str2nr won't accept an
explicitly
positive number, such as '+3'.
This is unexpected. Would you be willing to adjust the behaviour? I can't
think of
any negative/compatibility-breaking side
On 23/06/08 19:37, Andy Armstrong wrote:
On 23 Jun 2008, at 18:34, Gautam Iyer wrote:
Doesn't that allow '+-3' ?
This seems to go unnoticed in some other languages too (e.g. Python).
I assume that's because they support unary '+' as an operator. It's
not part of the numeric constant:
Tony Mechelynck wrote:
On 23/06/08 19:28, Ben Schmidt wrote:
Hi, Bram,
Another oddity I've recently discovered is that str2nr won't accept an
explicitly
positive number, such as '+3'.
This is unexpected. Would you be willing to adjust the behaviour? I can't
think of
any
Ben Schmidt wrote:
Another oddity I've recently discovered is that str2nr won't accept an
explicitly positive number, such as '+3'.
This is unexpected. Would you be willing to adjust the behaviour? I
can't think of any negative/compatibility-breaking side effects this
would have, but I
Bram Moolenaar wrote:
Ben Schmidt wrote:
Another oddity I've recently discovered is that str2nr won't accept an
explicitly positive number, such as '+3'.
This is unexpected. Would you be willing to adjust the behaviour? I
can't think of any negative/compatibility-breaking side effects
Ben Schmidt wrote:
Bram Moolenaar wrote:
Ben Schmidt wrote:
Another oddity I've recently discovered is that str2nr won't accept an
explicitly positive number, such as '+3'.
This is unexpected. Would you be willing to adjust the behaviour? I
can't think of any