ASPL Programming ver 1.00
© 2024 Bassem W. Jamaleddine


13. 25
   merge merges set variables into a set variable

 

logo

merge s1 [s2 .. sN] into targetvar       where s1 [s2 .. sN] targetvar are set variables

merge

When specified by itself then merges the object on top of stack with the one one below top of stack then pushes result on the stack

merge  setoid  1*t          ins:H_H_H  ous:H_H_H

●  Operator merge merges set variables into a set variable

Use the merge operator to merge one or many datasets into a dataset. This set operator can be followed by one or many set variables to be merged into a set variable.

 

merge Example

The following example shows how to merge three set variables into one. In the following operation we will load the sample workspace WS1.

 

merge Operation

aspl WS1

①  aspl> merge  a1 a2 a3 into a123
    (merge a1 a2 a3 into set variable a123 )

②  aspl> u123 = gU a1 a2 a3
    (get the group union of a1 a2 a3 and assign it to u123)

③  aspl> v
    (view symbol table)

④  aspl> equal a123 u123
    (compare set equality of a123 and u123)