Re: Multi-assign

new topic     » goto parent     » topic index » view thread      » older message » newer message

Some interesting possibilities with LHS symbolic sequences:

  • Initializing several variables with the same value:
{a,b,c} = 0


  • Incrementing several variables:
{a,b,c} += 1


  • Adding different values for different variables:
{a,b,c} += {d,e,f}


  • Doubling several variables:
{a,b,c} *= 2


- Fernando

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu