Re: Discuss changing the behaviour of append()

new topic     » goto parent     » topic index » view thread      » older message » newer message
DerekParnell said...
object X, Y 
X = 4      Y = {8,9}  X &= {Y} --Result is {4, {8,9}} 
X = {4}    Y = {8,9}  X &= {Y} --Result is {4, {8,9}} 
X = {4,5}  Y = {8,9}  X &= {Y} --Result is {4, 5, {8,9}} 
X = {}     Y = {8,9}  X &= {Y} --Result is {{8,9}} 

So, if the change is made to Euphoria's append()/prepend() functions to do this, programs that now currently fail in this situation will no longer fail. Is that okay?

These append()/prepend() are for operations with sequences (in pure 20 years old EU).
So, if you do not have some sequence to operate with, just do not use append()/prepend().

Use & and be happy :)
Regards


kinz

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

Search



Quick Links

User menu

Not signed in.

Misc Menu