On Sun, 27 May 2007, Elliot Clifton wrote:
Hi Peter,
Thanks for your reply. I think I may have misunderstood the variable section on the wiki. I been using \setvariable to both declare and assign variables from my component files. When I should have been declaring them in the environment file first, right? \setvariable[namespace][key=DefaultValue], right? So how do I test for a (Default)Value? Sorry, I'm just beginning TeX programming I don't understand how to do this.
Elliot, You can use \doif{\getvalue{set}{var}}{value} for simple string comparisons. See http://wiki.contextgarden.net/System_Macros for basic flow control features of ConTeXt. It may also be possble to see if variables have changed using setups http://wiki.contextgarden.net/Inside_ConTeXt#Using_setups_for_namespaces but I have never personally used that. Aditya