Multiple variable assignment eh! Try it on groovy...
I know you can at least do it like... Not sure though I wasn't able to
really dig deep on groovy language but theres a good documentation that'll
help...

def (eeny,meeny,miney,mo) = [1+1,1*2,1^10,1/1]
println(eeny,meeny,miney,mo)

def (eeny,meeny,miney,mo) = [mo,meeny,miney,eeny]
println(eeny,meeny,miney,mo)

http://groovy.codehaus.org/Multiple+Assignment

=p



On Mon, Feb 14, 2011 at 11:35 PM, hard wyrd <[email protected]> wrote:

> Can your language do this?
>
>
> > eeny,meeny,miney,mo=1+1,1*2,1^10,1/1
> > print(eeny,meeny,miney,mo)
> 2 2 1 1
> > eeny,meeny,miney,mo=mo,meeny,miney,eeny
> > print(eeny,meeny,miney,mo)
> 1 2 1 2
>
>
>
>
> --
> -------------------------------------------------------------
> "Penguin, penguin, and more penguin !"
>
> http://www.webhostadmins.com
> http://www.madforubuntu.com
> http://baudizm.blogsome.com
>
> _________________________________________________
> Kagay-Anon Linux Users' Group (KLUG) Mailing List
> [email protected] (http://lists.linux.org.ph/mailman/listinfo/klug)
> Searchable Archives: http://archives.free.net.ph
>



-- 
*
Paul Michael Z. Labis
Software Engineer and
Trainer @ Orange and Bronze Software Labs - Makati City, PH.
Z-6 Molugan, El Salvador City, Mis. Or.
Mobile #: +63915-702-8445

Techie Boy
Sharing intelligence and experience in technology and life.
Blog: http://techieboycdo.blogspot.com/

Privileged/Confidential Information may be contained in this message. If you
are not the addressee indicated in this message (or responsible for delivery
of the message to such person), you may not copy or deliver this message to
anyone. In such case, you should destroy this message and kindly notify the
sender by reply email. Please advise immediately if you or your employer
does not consent to Internet email for messages of this kind. Opinions,
conclusions and other information in this message that do not relate to the
official business of my firm shall be understood as neither given nor
endorsed by it.
*
_________________________________________________
Kagay-Anon Linux Users' Group (KLUG) Mailing List
[email protected] (http://lists.linux.org.ph/mailman/listinfo/klug)
Searchable Archives: http://archives.free.net.ph

Reply via email to