[NTG-context] Failing \doifemptyelse

Hans Hagen j.hagen at xs4all.nl
Thu Jun 23 23:00:48 CEST 2022


On 6/23/2022 9:16 PM, Willi Egger via ntg-context wrote:
> 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
there's also

\doifelsevariable {Test} {Number}

that can be used



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list