search for: _r_check_bogus_return_

Displaying 2 results from an estimated 2 matches for "_r_check_bogus_return_".

2020 Nov 20
1
return (x+1) * 1000
...;s only for the case when one forgets the parentheses, e.g. 'return' instead of 'return()'. I don't think it catches this case but I'm also not sure. Though, I can imagine it might be possible to enhance the current check to include also this case. It could be that setting _R_CHECK_BOGUS_RETURN_=true will enable this check also in earlier versions in R; not sure when it was introduced. /Henrik On Fri, Nov 20, 2020, 13:58 Gabriel Becker <gabembecker at gmail.com> wrote: > Hi all, > > I can confirm this occurs for me as well. > > The one thing that comes to mind is th...
2020 Nov 20
5
return (x+1) * 1000
Dear r-developers- After many years of using and coding in R and other languages, I came across something that I think should be flagged by the parser: bug <- function (x) { return (x + 1) * 1000 } > bug(1) [1] 2 The return() call is not like any other function call that returns a value to the point where it was called from. I think this should straightforwardly be handled in the