Page 1 of 1

Operator inconsistency

Posted: 24 Dec 2017, 06:42
by nnnik
The code:

Code: Select all

var := "String"
Msgbox % "String" * 0
Msgbox % var * 0
delivers the same result twice for AHK_L but creates 2 different results for AHK_H.
The first Msgbox returns "String0", which seems wrong to me.
The second returns "" which is consistent with AHK_L.
Is this a bug?

Re: Operator inconsistency

Posted: 24 Dec 2017, 14:57
by HotKeyIt
Which AHK_L version did you test, result is the same for me with the latest version.
Seems to be due to Msgbox % * 0 interpreted as Dereference instead of multiplier.

Re: Operator inconsistency

Posted: 25 Dec 2017, 04:14
by nnnik
HotKeyIt wrote:Which AHK_L version did you test, result is the same for me with the latest version.
Seems to be due to Msgbox % * 0 interpreted as Dereference instead of multiplier.
Indeed there is no inconsistency in AHK_H my mistake.