Re: Generic symbolic sequence assignment
- Posted by petelomax Nov 19, 2011
- 1283 views
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