View Issue Details

IDProjectCategoryView StatusLast Update
0000715MetaPostbugpublic2012-12-10 12:13
ReporterTacoAssigned ToTaco 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.504 
Target VersionFixed in Version 
Summary0000715: Error on using implicit suffix parameter (mpost 1.504)
DescriptionFrom Nicola:


Hi,
feeding mpost 1.504 (from TeX Live 2011) with the following code

vardef XYZ.test =
   for i = incr(#@) downto 0 : message decimal(i); endfor
enddef;
XYZ = 5;
XYZ.test;

results in

! A statement can't begin with `:='.
<to be read again>
                   :=
downto->begingroup(SUFFIX2):=
                             (SUFFIX2)+1;(SUFFIX2)endgroup
<to be read again>
                   step
downto->step
            -1until
implicit_suffix_param->....i=incr((SUFFIX0))downto
                                                  0:message.decimal(i);endfo...
l.12 XYZ.test
             ;
?

I'm pretty sure that this used to work previously. Can anyone confirm and/or
reproduce this? The bug only occurs under the following conditions:

- incr (or decr) is used in a for loop with upto or downto;
- incr/decr's argument is enclosed in parentheses.

Both incr #@ and (incr(#@)) are ok.

Nicola
TagsNo tags attached.

Activities

nicola

2011-09-13 14:13

reporter   ~0000907

To be precise, this issue is not related to implicit suffix parameters. The following example still exhibits the same behavior:

XYZ = 5; for i = incr(XYZ) downto 0: decimal(i); endfor

Issue History

Date Modified Username Field Change
2011-09-13 13:25 Taco New Issue
2011-09-13 13:25 Taco Status new => assigned
2011-09-13 13:25 Taco Assigned To => Taco
2011-09-13 14:13 nicola Note Added: 0000907
2012-11-17 14:23 Taco Status assigned => resolved
2012-11-17 14:23 Taco Resolution open => fixed
2012-12-10 12:13 Taco Status resolved => closed