ASPL Manual v 1.00
© 2024 by SetSphere.COM


13. 26
   copy copies a set variable into another set variable

 

logo

copy a1 a2       where a1 a2 are set variables

a1 is the source set variable and a2 is the target set variable

copy  setoid  2          ins:H_H_H  ous:H_H_H

●  Operator copy copies a set variable into another set variable

Use the operator copy to copy a set variable into another.

 

copy EXAMPLE
In this example we get the union of three set variables a1 a2 a3 and assign it to t123, then we copy a123 into t123 creating an identical copy of the variable.

 

copy OPERATION

aspl WS1
    (start ASPL loading the sample workspace WS1 )

①  aspl> tattler 1
    (enable the tattler to see the activity done on ASPL symbol tables)

②  aspl> v
    (print the symbol table)

③  aspl> a123 = gU a1 a2 a3
    (get the union of a1 a2 a3 into a123)

④  aspl> copy a123 t123
    (copy a123 into t123)

⑤  aspl> v
    (print the symbol table, see that t123 has been created)

⑥  aspl> v d t123
    (print the descriptor of t123)

⑦  aspl> purge a2 from t123 into t123_less2
    (purge the set a2 from t123 and set the result in t123_less2)

⑧  aspl> v
    (print the symbol table)