From: Damien Thiriet <damien@thiriet.web4me.fr>
To: ntg-context@ntg.nl
Subject: question about vardef variables
Date: Sun, 17 Jan 2021 11:17:00 +0100 [thread overview]
Message-ID: <20210117101700.GA30115@valencay.home> (raw)
Hi,
I have some troubles with understanding metafun's macro mechanism.
Given this MWE:
\starttext
\startMPpage
vardef Test (expr ab,cd)=
%numeric ab;
%numeric cd;
draw unitsquare scaled 10 xshifted ab;
draw unitsquare scaled 10 yshifted cd;
enddef;
Test (50,100);
\stopMPpage
\stoptext
Uncommenting the two declarations makes me run intro a silent error. I was
lucky enough yesterday to get an explicit error message with a more
complex macro. It made me figure out where my problems came from.
So here are my two questions:
- Why shouldn't we tell metafun if expr is a path, a pair or so on?
- Would it be possible to issue an error message each time this wrong
declaration is made?
Thanks,
Damien Thiriet
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2021-01-17 10:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-17 10:17 Damien Thiriet [this message]
2021-01-18 8:13 ` Taco Hoekwater
[not found] <mailman.1.1610881201.32131.ntg-context@ntg.nl>
2021-01-17 12:53 ` Jeong Dal
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=20210117101700.GA30115@valencay.home \
--to=damien@thiriet.web4me.fr \
--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).