If output from an action block is to be in the form of a list: some elements separated by comma, then the RXS variable cont may be used.
Contains the value ',' each time the action block is executed, except the last time, where cont is assigned the value ' '.
Other programming tasks than the production of lists may also benefit from the flag cont signalling 'now last triggering' of the action block.
RXS contains no similar flag for first record. Needing to flag this, some start_switch may be initialized in the general orders. General orders are executed once, just before the first executing of the action block.
if start = 1 then do
"Here is the resulting list:"
start = 0
if cont = "" then do
Here is the resulting list:
|| is the concatenating operator in RXS, meaning consecutive writing of the strings before and after the operator.
Another way of concatenating strings in RXS is to write an empty string between the two strings. That is (referring to the example above):
In the line above, "" is the empty string.
This last solution may create a conflict with RXS' notation for hexadecimal strings: "12AB"x means the hexadecimal string 12AB.