In the manual ist is written for the ternary operator
a ? b : c
“to facilitate chaining, the operator associates from right to left.”
Thanks Hernrique for the solution below:
So it seems rigth association does tell how to put the brackets, but not that the bracketed term is evaluated first.
julia>test(x, y) =
println( (println(“A5”);x) <= (println(“A6”);y) ? (println(“A7”);x) <= (println(“A8”);y) ?
(println(“A1”);“x is Type1”)
: (println(“A2”);“x is Type2”)
: (println(“A3”);“x is Type3”)
x is Type1
I understand the result. But I do not see why that behaviour is called operator associates from right to left.
Best greetings Gerhard