"Dat Nguyen" <thucdat / hotmail.com> writes:

> a = 0??????????????? # => 0
> 
> a+ 1???????????????? # => 1
> 
> a++ 1?????????????? # => 1
> 
> a+++ 1???????????? # => 1
> 
> a+ ++++++ 1?? # => 1
> 
> a + --- 3?????????? #=>
> 
> a + *** 3???????? #=> SyntaxError: compile error
> (irb):28: parse error
> 
> Why?

Because '+' is both a unary and a binary operator, and '*' isn't.

Now, for extra credit, why is this OK

  a+ 1

and this isn't:

  a +1

Regards


Dave