[NTG-context] \write \getvariable and expansion
Taco Hoekwater
taco at elvenkind.com
Sun Nov 19 10:39:33 CET 2006
Aditya Mahajan wrote:
> Hi,
>
> Can someone explain what should be the correct order of expansion
> here. I want to enter the date entered as a variable to a file.
>
> \setvariables
> [test]
> [date={d=11,m=11,y=2006}]
>
> \starttext
>
> The date entered was \expanded{\date[\getvariable{test}{date}]}.
>
> \immediate\openout \scratchwrite test-001
> \immediate\write \scratchwrite {The date entered was}
> % None of these work.
The best you can get is:
\immediate\write\scratchwrite{\noexpand\date[\getvariable{test}{date}]}
(The variable is expanded, but \date is not)
Greetings, Taco
More information about the ntg-context
mailing list