Donno...
This could be somewhat more deeper and wider meanings.
In that case I just quit.
Because, I do not have any kind of professional knowledge or experience about Computer Programming Language Design.
Below is not so proper comment for this brief question
So, I am not going to make any comment further in here.
Just leave this one as the last comment here.
Earlier I thought, AHK does not have any kind of type (data type)
But, I was wrong
It has 3 types clearly and 2 extras. So, AHK has 5 types.
- Strings, Numbers and Objects (Boolean, Nothing)
Then, if you execute an operation between Stings types, its result should be Strings type too.
Just like case3 and case4 below.
But, it executed as Numbers type operation, so the results are "wrong" <-- different result type and different result value.
Finally, I confirmed this problem in the case5 and case6.
I was supposed to have "12" (Numbers type) from case5 - but, it looks like "111" Strings type
I was supposed to have "-10" (Numbers type) from case6 - but, it looks like "1" Numbers type (or "1" Strings type)
I'd rather call it an operational '
BUG'
Code: Select all
x := 0
y := 0
a := "1"
b := "11"
MsgBox % ""
. "case 1 " x - y "`n"
. "case 2 " x . - y "`n"
. "case 3 " a - b "`n"
. "case 4 " a + b "`n"
. "case 5 " "1" + "11" "`n"
. "case 6 " "1" - "11" "`n"