Re: Generic symbolic sequence assignment

new topic     » goto parent     » topic index » view thread      » older message » newer message
Fernando said...

Could we use any kind of symbolic sequence in LHS of assignment ?

For example, would the following assignment be possible?

{{a,b},c} = {{d,e},f} 

Brilliant idea!

DerekParnell said...

Isn't this simplier and faster ...

a = d 
b = e 
c = f 

Shame on you!

FWIW, Phix has, or will have:
= - the "ambiguous" (ie context-dependent) operator as per OpenEU
:= - the explicit assignment operator (not properly implemented yet)
== - the explicit equality operator

Note that Phix only permits these explicit operators as an aid for legibility; it does NOT extend functionality, so both

  a==0 

and

  if a:=0 then 

generate compiler errors

Pete
Forked into: Phix language

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

Search



Quick Links

User menu

Not signed in.

Misc Menu