* [NTG-context] Fwd: expansion and variables
[not found] <fccac199-96e2-4bc8-bf04-5d6b0012afbe@xs4all.nl>
@ 2024-07-17 21:10 ` Hans Hagen
2024-07-18 6:33 ` [NTG-context] " Henning Hraban Ramm
0 siblings, 1 reply; 2+ messages in thread
From: Hans Hagen @ 2024-07-17 21:10 UTC (permalink / raw)
To: mailing list for ConTeXt users
-------- Forwarded Message --------
Subject: Re: [NTG-context] expansion and variables
Date: Wed, 17 Jul 2024 23:10:23 +0200
From: Hans Hagen <j.hagen@xs4all.nl>
To: Henning Hraban Ramm <texml@fiee.net>
On 7/17/2024 10:40 PM, Henning Hraban Ramm wrote:
> Something’s wrong with my code.
> I’ll try to keep a status to output a certain marker only the first time
> after a change. With the code below I get it never.
>
> I guess it’s an expansion problem again, but I didn’t find the right
> places for \expanded – if I use it in front of every \getvariable, I get
> the output every time.
>
> Please help…
> Hraban
\setevariable
>
> \setvariable{Thing}{Status}{1}
> \setvariable{Thing}{PreviousStatus}{0}
>
> \define[1]\startThing{
> \setvariable{Thing}{PreviousStatus}{\getvariable{Thing}{Status}}
> \setvariable{Thing}{Status}{#1}
> <<< %
>
> \doifnot{\getvariable{Thing}{Status}}{\getvariable{Thing}{PreviousStatus}}{%
> \bold{\getvariable{Thing}{Status}}%
> }%
> }
>
> \def\stopThing{>>>\par}
>
> \starttext
>
> \startThing{A} a \stopThing
> \startThing{B} b \stopThing
> \startThing{A} c \stopThing
> \startThing{C} d \stopThing
> \startThing{C} e \stopThing
> \startThing{A} f \stopThing
> \startThing{A} g \stopThing
> \startThing{A} h \stopThing
>
> \stoptext
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry
> to the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
--
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* [NTG-context] Re: Fwd: expansion and variables
2024-07-17 21:10 ` [NTG-context] Fwd: expansion and variables Hans Hagen
@ 2024-07-18 6:33 ` Henning Hraban Ramm
0 siblings, 0 replies; 2+ messages in thread
From: Henning Hraban Ramm @ 2024-07-18 6:33 UTC (permalink / raw)
To: ntg-context
Am 17.07.24 um 23:10 schrieb Hans Hagen:
> \setevariable
Thank you, works!
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-18 6:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <fccac199-96e2-4bc8-bf04-5d6b0012afbe@xs4all.nl>
2024-07-17 21:10 ` [NTG-context] Fwd: expansion and variables Hans Hagen
2024-07-18 6:33 ` [NTG-context] " Henning Hraban Ramm
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).