Any idea why the top IF calc gives a false result of 0.25, even when 12>9. Any values above 9.99 look to give the false result. Thanks.
@Vaclav_Hirsch, if you feed panels directly, the content is interpreted as string by the Expression component. If you convert them to numbers before, the result checks out:
Thanks for the quick response!
@ale2x72 showed the correct way to do it - please mark his post as solution.
but still we miss the explanation why exactly 12.0 fails (and also 89.0) but 9.9 behaves as expected:
many programming languages allow
"myString" > "otherString"
and this is comparison is based on lexicographic (?) order. a,b,c,…1,2,3,4…
it s the position in the sorted list that is compared.
it would be nice if it would based on natural sorting
myFile1
myFile2
myFile10
myFile123
in case of grasshopper expression, my guess the GH_ExpressionParser is using lexicographic order to evaluate "12.0" > "9.0" like text sorting…
this is confusiong because other symbols will cast the string to double
it s a good practice to carefully look at the input / Variables, you will see how the parameters got casted or not





