Demonstration code:
@set foo=123
// Works.
@output:{$foo}.
@output:{=$foo=}.
@output:{=Val("$foo")=}.
// Doesn't work.
=Output($foo + ".")
=Output(Val("$foo") + ".")
@evalalways:Output($foo + ".")
@evalalways:=Output($foo + ".")
I wondered what the problem was. Only when writing all of these options down - accidentally in a revealing order - and seeing that the latter Evaluator outputs were printed first, it dawned on me that these lines will be executed at parse time or between parse time and regular execution time. The docs are misleading in this regard. They just say you can use @set
values in Evaluator expressions.
Also, should it be @eval[always]:...
or @eval[always]:=...
? The docs show both variants in examples: with and without =
. What's the difference, and why do both variants exist?