ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* ! Declared variable conflicts with previous vardef [Metapost]
@ 2019-01-03  1:43 Fabrice Couvreur
  2019-01-03  3:22 ` Henri Menke
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Couvreur @ 2019-01-03  1:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi,
I have a problem compiling this file.
Thanks.
Fabrice

###### test file ################################################
\starttext
\setupbodyfont [pagella,9pt]
\startMPpage[offset=2pt]
  path p, q, r, b ; pair z[];
  p  := unitsquare xyscaled (9cm,5cm) ;
  z[0] = (2cm,0cm) ;
  z[1] = (2cm,2cm) ;
  z[2] = (0cm,2cm) ;
  q := llcorner p--z[0]--z[1]--z[2]--cycle ;
  r := unitsquare xyscaled (7cm,3cm) shifted(2cm,2cm) ;
  b := z[2]--z[1]--ulcorner r--urcorner p--lrcorner r--z[1]--z[0]--llcorner
p--cycle ;
  draw p ;
  draw b numberstriped (.25,15,5) withcolor magenta ;
  label.llft("A", p) ;
  label.lrt("D", p) ;
  label.ulft("C", p) ;
  label.urt("B", p) ;
  label.lft("M", z[2]) ;
  label.ulft("N", z[1]) ;
  label.bot("P", z[0]) ;
  label.top("J", ulcorner r) ;
  label.rt("I", lrcorner r) ;
  label.bot(btex $x$ etex,(llcorner p+z[0])/2);
  label.lft(btex $x$ etex,(llcorner p+z[2])/2);
\stopMPpage

\stoptext
#############################################################
! Declared variable conflicts with previous vardef.
<to be read again>
;
<*> path p, q, r, b ; pair z[] ;
z[0] = (2cm,0cm) ; z[1] = (2cm,2cm) ; z[2] ...
You can't use, e.g., `numeric foo[]' after `vardef foo'.
Proceed, and I'll ignore the illegal redeclaration.

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

[-- Attachment #2: Type: text/plain, Size: 492 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-03 11:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-03  1:43 ! Declared variable conflicts with previous vardef [Metapost] Fabrice Couvreur
2019-01-03  3:22 ` Henri Menke
2019-01-03  6:11   ` Alan Braslau
2019-01-03 10:31     ` Fabrice Couvreur
2019-01-03 11:03       ` Taco Hoekwater

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).