> -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.
>
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
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
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'
>
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
>
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 =
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
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