Re: [Bug 1857702] Re: " +=" operator does string concatenation for integer variables

2019-12-27 Thread jvdh
On 27.12.19 23:02, Thorsten Glaser wrote: > and it’s most definitely not emulation of ksh93 > > some ksh88 and little parts of ksh93, but e.g. no float and other crap I've never used ksh88. so I do not know the intersection with ksh93. but my experience so far is that it seems easier to port a

[Bug 1857702] Re: " +=" operator does string concatenation for integer variables

2019-12-27 Thread Thorsten Glaser
and it’s most definitely not emulation of ksh93 some ksh88 and little parts of ksh93, but e.g. no float and other crap or complicated things -- You received this bug notification because you are a member of mksh Mailing List, which is subscribed to mksh. Matching subscriptions:

[Bug 1857702] Re: " +=" operator does string concatenation for integer variables

2019-12-27 Thread Thorsten Glaser
01 in an integer variable is still 1 on output (010 may be 10 or 8 depending on the posix flag) more later -- You received this bug notification because you are a member of mksh Mailing List, which is subscribed to mksh. Matching subscriptions: mkshlist-to-mksh-bugmail

[Bug 1857195] Re: here string behaviour different in mksh and ksh93

2019-12-27 Thread jvdh
that (restoring consistency with ksh93/bash) would be good, I believe. subtle incompatibilities in behaviour (as opposed to syntax differences causing manifest syntax errors) are the most painful when porting scripts between shells in my experience, especially because they might be missed during

Re: [Bug 1857702] Re: " +=" operator does string concatenation for integer variables

2019-12-27 Thread jvdh
On 27.12.19 17:02, Thorsten Glaser wrote: > Erm… that’s right, += is string concatenation. ok, I got it that this seems to be the idea here, but 1. what about typeset -i x=0; x+=1; echo $x # → 1 (as in ksh/bash/zsh) if += categorically does string concat no matter what, should this not

[Bug 1857195] Re: here string behaviour different in mksh and ksh93

2019-12-27 Thread Thorsten Glaser
Thanks for the extensive debugging/comparing work. I think I’ll change mksh to match AT ksh93 for consistency and will try to hunt down the cause for the difference. ** Changed in: mksh Importance: Undecided => Low ** Changed in: mksh Status: New => Triaged ** Changed in: mksh

[Bug 1857702] Re: " +=" operator does string concatenation for integer variables

2019-12-27 Thread Thorsten Glaser
Erm… that’s right, += is string concatenation. Write “let” before the line to make it integer addition. -- You received this bug notification because you are a member of mksh Mailing List, which is subscribed to mksh. Matching subscriptions: mkshlist-to-mksh-bugmail

[Bug 1857702] [NEW] " +=" operator does string concatenation for integer variables

2019-12-27 Thread jvdh
Public bug reported: consider typeset -i x=0; x+=1; echo $x # → 1 (as in ksh/bash/zsh) but typeset -i x=1; x+=1; echo $x # → 11 (rather than 2 as in the other shells) I believe mksh should honour the integer declaration and interpret `+=' accordingly. currently, it does not even consistently