Re: [Rd] reference counting bug related to break and next in loops

2009-06-12 Thread William Dunlap
> -Original Message- > From: William Dunlap > Sent: Wednesday, June 10, 2009 2:35 PM > To: 'l...@stat.uiowa.edu' > Cc: r-devel@r-project.org > Subject: RE: [Rd] reference counting bug related to break and > next in loops > > Thanks Luke. >

Re: [Rd] reference counting bug related to break and next in loops

2009-06-10 Thread William Dunlap
com > -Original Message- > From: l...@stat.uiowa.edu [mailto:l...@stat.uiowa.edu] > Sent: Wednesday, June 10, 2009 1:05 PM > To: William Dunlap > Cc: r-devel@r-project.org > Subject: Re: [Rd] reference counting bug related to break and > next in loops > > Thanks for the

Re: [Rd] reference counting bug related to break and next in loops

2009-06-10 Thread luke
Thanks for the report. It turns out that a similar issue arises in while() loops without break/next being involved because the test expression is evaluated after the final body evaluation. After some discussion we decided it was simplest both for implementation and documentation to have the valu

Re: [Rd] reference counting bug related to break and next in loops

2009-06-03 Thread Wacek Kusnierczyk
William Dunlap wrote: > help('while') says: > Usage: > for(var in seq) expr > while(cond) expr > repeat expr > break > next > Value: > 'for', 'while' and 'repeat' return the value of the last > expression evaluated (or 'NULL' if none was), invisibly. 'for' >

Re: [Rd] reference counting bug related to break and next in loops

2009-06-03 Thread William Dunlap
t; -Original Message- > From: r-devel-boun...@r-project.org > [mailto:r-devel-boun...@r-project.org] On Behalf Of Wacek Kusnierczyk > Sent: Wednesday, June 03, 2009 2:06 AM > To: r-devel@r-project.org > Subject: Re: [Rd] reference counting bug related to break and >

Re: [Rd] reference counting bug related to break and next in loops

2009-06-03 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > > a simplified example may help to get a clear picture: > > i = 1; y = 1:3; > (while(TRUE) { >y[i] = 0 >if (i == 2) break >i = i + 1 >y }) > # 0 0 3 > > i = 1; y = 1:3; > (while(TRUE) { >y[i] = 0 >if (i =

Re: [Rd] reference counting bug related to break and next in loops

2009-06-03 Thread Wacek Kusnierczyk
William Dunlap wrote: > One of our R users here just showed me the following problem while > investigating the return value of a while loop. I added some > information > on a similar bug in for loops. I think he was using 2.9.0 > but I see the same problem on today's development version of 2.10.0

[Rd] reference counting bug related to break and next in loops

2009-06-02 Thread William Dunlap
One of our R users here just showed me the following problem while investigating the return value of a while loop. I added some information on a similar bug in for loops. I think he was using 2.9.0 but I see the same problem on today's development version of 2.10.0 (svn 48703). Should the semant