ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jeong Dal <haksan@me.com>
To: ntg-context@ntg.nl
Subject: Re: question about vardef variables
Date: Sun, 17 Jan 2021 21:53:10 +0900	[thread overview]
Message-ID: <CAD80C55-A0B8-444C-8FE5-14FA2447F317@me.com> (raw)
In-Reply-To: <mailman.1.1610881201.32131.ntg-context@ntg.nl>


[-- Attachment #1.1: Type: text/plain, Size: 736 bytes --]

Dear Damien Thiriet,

If you change ‘vardef’ to ‘def’, you will get the figure.
There is a difference between ‘vardef’ and ‘def’.
AFAIK, vardef returns the value of the last statement in the macro.
Please see  the examples in Metafun manual from page 32 ~ .
I hope that you find your answer there.

I am sorry that I am not good enough to explain the variables.

Best regards,

Dalyoung

> 2021. 1. 17. 오후 8:00, ntg-context-request@ntg.nl 작성:
> 
> \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


[-- Attachment #1.2: Type: text/html, Size: 11050 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

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

       reply	other threads:[~2021-01-17 12:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1.1610881201.32131.ntg-context@ntg.nl>
2021-01-17 12:53 ` Jeong Dal [this message]
2021-01-17 10:17 Damien Thiriet
2021-01-18  8:13 ` Taco Hoekwater

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=CAD80C55-A0B8-444C-8FE5-14FA2447F317@me.com \
    --to=haksan@me.com \
    --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).