ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: Bruce Horrocks <ntg@scorecrow.com>,
	mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: \doifemptyelse issue?
Date: Tue, 14 Nov 2023 11:40:15 +0100	[thread overview]
Message-ID: <f78305be-7e3e-4089-b601-47afe0ee49a1@xs4all.nl> (raw)
In-Reply-To: <33A6C923-9BD4-4643-9082-C5768FE4ABC8@scorecrow.com>

On 11/13/2023 1:10 PM, Bruce Horrocks wrote:
> The following MWE gives "false false" instead of "false true". I'm sure this used to work (18 months or more ago!) as I found it when re-processing an old document.

because it's not empty (it's a command that you pass)

> ---start---
> \setdataset [DS] [a=aaaa]
> \setdataset [DS] [a=]
> 
> \starttext
> 
> :\datasetvariable{DS}{1}{a}: \crlf
> :\datasetvariable{DS}{2}{a}: \crlf
> 
> \doifemptyelse{\datasetvariable{DS}{1}{a}}{true}{false}
> 
> \doifemptyelse{\datasetvariable{DS}{2}{a}}{true}{false}
>    
> \stoptext
> ---end---
> 
> ConTeXt  ver: 2023.09.26 18:19 LMTX
> 
> There is a work-around using \doiftext instead as that seems to work okay with recalled dataset values but I thought I'd raise it.
for that we have:

\doifsomethingelse

Hans

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

  parent reply	other threads:[~2023-11-14 10:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13 12:10 [NTG-context] " Bruce Horrocks
2023-11-13 16:21 ` [NTG-context] " Pablo Rodriguez via ntg-context
2023-11-14 10:40 ` Hans Hagen [this message]
2023-11-14 18:02   ` Bruce Horrocks

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=f78305be-7e3e-4089-b601-47afe0ee49a1@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    --cc=ntg@scorecrow.com \
    /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).