More a curiosity than a bug!
Using simple blocks, try entering:
say <[heoll] = [hello]>(gives false)
say <[heoll] < [hello]>(gives false)
say <[heoll] > [hello]>(gives true)
set [TEST1 v] to [heoll] set [TEST2 v] to [hello] say <(TEST1) + (TEST2)>(gives zero)
set [TEST1 v] to [heoll] say <(TEST1) + [2]>(result = 2)
set [TEST2 v] to [hello] say <(TEST2) + [2]>(result = 2)
Offline
Offline
They are both undefined values, which when put into numerical functions such as equals and greater than, report 0. I don't know why the > one reports true, but it doesn't matter.
This isn't really a bug because you aren't supposed to use those functions that way anyways.
Offline
Wes64 wrote:
They are both undefined values, which when put into numerical functions such as equals and greater than, report 0. I don't know why the > one reports true, but it doesn't matter.
This isn't really a bug because you aren't supposed to use those functions that way anyways.
why not?
Offline
operationDEADTREE wrote:
Wes64 wrote:
They are both undefined values, which when put into numerical functions such as equals and greater than, report 0. I don't know why the > one reports true, but it doesn't matter.
This isn't really a bug because you aren't supposed to use those functions that way anyways.why not?
There is no mathematical solution for something like this.
<[apple] > [pie]>
Offline
It's not an error at all, but rather some complicated casting. When you compare strings in the <> operators, it evaluates alphabetically, so that a<b, and g>e. When you use a string, any string, in a numerical insert, it treats it as having a value of 0.
Offline