Are there limitations as to how list concatenation works. We would like to store strings within a list whereby the most recent becomes the first element and the other values are in essence pushed down a position. As an example, List := String : List; I see an example in help of List := List : String which would add the string as the last value. It appears that the first (new values become first) does not work as expected. Anyone have any insights as to how to do this? Do we as an example have to Implode the current list, add the string in front of this, and then Explode back to the list?
Subject: Precendence
I find precedence to be the most common reason for list concatenation problems. List concatenation has the highest precedence, so it’s easy to accidentally misapply operators when you mix operations. Parenthesis fix such problems. E.g.
list1 := “malt”:“chocolate”;
list2 := (list1+" shake"):“strawberry icecream”;
@Return(list2)
With the parenthesis:
malt shake; chocolate shake; strawberry icecream
Without the parenthesis you’d get:
malt shake; chocolatestrawberry icecream