Skip to content
Prev 174710 / 398506 Next

If statement generates two outputs

Romain Francois wrote:
thanks.  so it seems to be intentionally parsable, though i wouldn't say
that this gives a meaning to ':=' -- the operator has a syntactic
category, but no semantics.  the syntactic category does not imply any
semantics, as in

    '<-' = function(a, b) NULL
    1 <- a
    # NULL

where '<-' is still parsed the original way (as a LEFT_ASSIGN, gram.y
again), but has now a completely different semantics.

it looks like a bug to me:  ':=' is parsed on par with '<-' as a
LEFT_ASSIGN, but apparently is not backed by any function.  it's a
zombie.  (unless rvalues is used, that is.)

vQ