ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@bittext.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: Numbers obtained by commands <\datasetvariable> cannot be copied to counters
Date: Wed, 29 May 2024 14:48:14 +0200	[thread overview]
Message-ID: <054011E6-F8D3-47B3-BA5D-945E90F0C201@bittext.nl> (raw)
In-Reply-To: <171698432131.1996.6583951499689676818@cgl.ntg.nl>



> On 29 May 2024, at 14:05, ai2472206007@yeah.net wrote:
> 
> I'm defining a command to generate options for multiple choice questions, 
> but at the moment I'm stuck at this step. 
> I want to get a number and assign a value to the counter, but why can't I get it?
> 
> %%%%
> \starttext
> \definedataset [myset]
> \setdataset    [myset] [foo=1,boo=4]
> \newcount\tempa
> \datasetvariable{myset}{1}{boo} % definitely get 4
> %\tempa=\datasetvariable{myset}{1}{boo} % why i cannt pass 4 to tempa?
> %\number\tempa
> \stoptext

Works for me (minus comment signs of course):

 ConTeXt  ver: 2024.03.11 09:34 LMTX

Best wishes,
Taco


___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2024-05-29 12:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29 12:05 [NTG-context] " ai2472206007
2024-05-29 12:48 ` Taco Hoekwater [this message]
2024-05-29 14:32   ` [NTG-context] " ai2472206007
2024-05-29 14:30 ` Wolfgang Schuster
2024-05-29 14:33   ` ai2472206007
2024-05-29 15:20 ` ai2472206007

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=054011E6-F8D3-47B3-BA5D-945E90F0C201@bittext.nl \
    --to=taco@bittext.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).