[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Compound Parallel Operators

Hal E. Fulton

10/5/2006 11:34:00 PM

Gavin Kistner wrote:
> (I didn't see an RCR for this, and my lazy 60s of searching didn't find
> any discussion about it. If it's been discussed before, just say so and
> I'll go hunt for the discussion properly.)
>
> Ruby allows parallel assignment:
> a,b,c = x,y,z
>
> Ruby interprets compound operators:
> a *= x
> as
> a = a * x
>
> Wouldn't it be nice if all compound operators worked with parallel
> assignment?
> a,b,c *= x,y,z
> would thus be interpreted as
> a *= x
> b *= y
> c *= z

I brought this up once... but there was some Good Reason it didn't
work that way.


Hal