On Thu, 26 Sep 2002, Joe Gottman wrote:
: Apocalypse 4 mentions unary '?' . Since this is used to force boolean
: context, I would assume that it has the same precedence as unary '+' and
: '_' which force numeric and string context respectively. By the way, has
: anyone come up with a use for binary '?' yet?
More likely to be a postfix operator. Maybe it even means the same thing:
if ?foo() {...}
if foo()? {...}
I've always wondered what the ! postfix operator means. The mathematicians
think they know. :-)
There's this basic rule that says you can't have an operator for both binary
and postfix, since it's expecting an operator in either case, rather than a
term (which is how we recognize prefix operators). The one exception I can
think of is that we might allow .. as a postfix operator, but only if followed
by a right bracket. That would let us say
@a[0..]
rather than
@a[0..Inf]
But that's a special case.
Larry