Hello,
@Martin Maechler:
%until% and %while% use R's builtin repeat function. Something like
do(expr) %until% (cond)
repeat {
expr
if (cond)
break
}
are identical. After %until% and %while% check the arguments look correct,
it makes a call to repeat like above and evaluates it i
On 10/08/2021 11:25 p.m., Andrew Simmons wrote:
Hello,
I've written two functions to emulate do while/until loops seen in other
languages, but I'm having trouble documenting its usage. The function is
typically used like:
do ({
expr1
expr2
...
}) %while% (cond)
so I want to doc
> Hello,
>
> I've written two functions to emulate do while/until loops seen in other
> languages, but I'm having trouble documenting its usage. The function is
> typically used like:
>
> do ({
> expr1
> expr2
> ...
> }) %while% (cond)
I understand that you did *not* ask .. but reall
When not preceded by an expression wrapped in do(), %while% would throw an
error "do while loop must begin with 'do'". The function %while% looks like
`%while%` <- function (expr, cond)
invisible(.Call(C_do.while, substitute(expr), substitute(cond),
parent.frame()))
and the corresponding C functi
What is the behaviour of %while% if not preceded by an expression wrapped
in do() ?
On Wed, 11 Aug 2021 at 1:26 pm, Andrew Simmons wrote:
> Hello,
>
>
> I've written two functions to emulate do while/until loops seen in other
> languages, but I'm having trouble documenting its usage. The functio
Hello,
I've written two functions to emulate do while/until loops seen in other
languages, but I'm having trouble documenting its usage. The function is
typically used like:
do ({
expr1
expr2
...
}) %while% (cond)
so I want to document it something like:
do(expr) %while% (cond)
do(