[dev-context] Storing and retrieving two-pass data

Marco netuse at lavabit.com
Wed Apr 18 14:15:53 CEST 2012


On 2012-04-18 Wolfgang Schuster <schuster.wolfgang at googlemail.com> wrote:

> The following works with the current beta, you can find another example in
> core-dat.mkiv.
> 
> […]

Thanks a  lot. One more  question: How  to address the  last element
without manually keeping track of how  often it was saved? Anyhow, I
am just interested in the last  saved value. A solution which simply
overwrites the old value every time would also be fine.

\starttext
	\definedataset [test]
	\setdataset    [test] [foo=first]
	\setdataset    [test] [foo=second]

	% I don't know that element "2" is the last
	foo is: \datasetvariable{test}{2}{foo}

	% what I need
	% foo is: \datasetvariable{test}{"last"}{foo}
\stoptext

Regards

Marco




More information about the dev-context mailing list