put one array after another

Monte Goulding monte at appisle.net
Wed Aug 10 16:39:42 EDT 2016


I agree that it is union that you want here, however, it is interesting to note that Peter just recently implemented list concatenation using the & operator in LCB. This might have been applicable if you were working with ordered numerically indexed arrays. I’ve been thinking lately about commands for lists in LCS that could work equally well for items, lines and elements of 1…N arrays. Things like:

push <value> onto {front | back} {item | line | element} of <list>
pop from {front | back} {item | line | element} of <list> [into <var>]
append <list> to {items | lines | elements} of <list>

Here <list> is either a string or a 1…N indexed array.

Unfortunately I think we would need an explicit append command rather than using a concatenation operator or put after/before because of the way arrays are silently converted to empty strings.

Cheers

Monte



More information about the use-livecode mailing list