24 Jun
2022
24 Jun
'22
3:42 a.m.
Hans Hagen via ntg-context schrieb am 23.06.2022 um 23:00:
Good evening gurus!
Why is the minimal example failing? i.e. executing always the else-branch?
\setuppapersize[A6][A6]
\setvariables [Test] [Number=]
\starttext Value of variable Number before test: \getvariable{Test}{Number} \crlf
\doifemptyelse{\getvariable{Test}{Number}} {\dorecurse {5} {TEST} } {Nothing defined \par Contents of variable Number: \getvariable{Test}{Number} }
\stoptex
On 6/23/2022 9:16 PM, Willi Egger via ntg-context wrote: there's also
\doifelsevariable {Test} {Number}
that can be used
in this case \doifelseemptyvariable{Test}{Number}{...}{...} is the better choice Wolfgang