ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* variables
@ 2003-07-15 12:59 Peter Rolf
  2003-07-15 14:22 ` variables Taco Hoekwater
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Rolf @ 2003-07-15 12:59 UTC (permalink / raw)


I want to test, if a given variable is empty or not. I tried the following,
but the test is always false. Is this a bug or a feature ;)
Any help is welcome.


\starttext

\setvariables[test]
  [first=,
   second=something,]

\def\TestVAR#1{\getvariable{test}{#1}}

\if\TestVAR{first}\empty %
  The variable test:first is empty.\else
  The variable test:first contains \TestVAR{first}.\fi

\if\TestVAR{second}\empty %
  The variable test:second is empty.\else
  The variable test:second contains \TestVAR{second}.\fi

\stoptext


Regards,

   Peter

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-07-16  9:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-15 12:59 variables Peter Rolf
2003-07-15 14:22 ` variables Taco Hoekwater
2003-07-16  9:11   ` variables Peter Rolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).