ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* programming: doifdefined & friends
@ 2006-10-05  0:42 Henning Hraban Ramm
  2006-10-05  0:56 ` Henning Hraban Ramm
  2006-10-05  4:04 ` Aditya Mahajan
  0 siblings, 2 replies; 4+ messages in thread
From: Henning Hraban Ramm @ 2006-10-05  0:42 UTC (permalink / raw)


While I can't cope with counters, I'm trying other stuff that I don't  
understand:
How must I use \doifdefined & friends?

Consider this snippet:

-----
\starttext

\def\myvar{JAJAJA}

\input tufte
\doifdefined{\myvar}{\par bla \myvar blub\par}
\input tufte

\stoptext
-----

I'd guess it would print "bla JAJAJAblub" between the two Tufte texts  
and don't if I comment \def\myvar.

But I guess wrongly: It does nothing in this case, and complains  
about undefined \myvar in the latter.

But if I really want to check if something is defined before I try to  
use it, how must I write it?
(Expansion magic?)


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://contextgarden.net
http://www.cacert.org (I'm an assurer)

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

end of thread, other threads:[~2006-10-05  4:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-05  0:42 programming: doifdefined & friends Henning Hraban Ramm
2006-10-05  0:56 ` Henning Hraban Ramm
2006-10-05  1:15   ` Henning Hraban Ramm
2006-10-05  4:04 ` Aditya Mahajan

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).