![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
18 Sep
2019
18 Sep
'19
6:26 a.m.
On Wed, 18 Sep 2019, Jeroen wrote:
\startMPcode pair a; a := 2cm;
You define a to be a pair and then assign it to a number. Metapost is telling you that you cannot do that:
(xpart a,ypart a) 56.6929 ! Equation cannot be performed (pair=numeric). <to be read again> ; <*> pair a; a := 2cm; draw fullcircle scaled (2*a); ; I'm sorry, but I don't know how to make such things equal. (See the two expressions just above the error message.)
You can fix that by saying numeric a; a := 2cm; One needs to keep in mind that all the code in multiple MPcode environments are run in the same scope. I occasonally use \startMPcode begingroup; ... endgroup; \stopMPcode to avoid interference. Aditya