LOCAL the_set : SET OF GENERIC:intype := []; END_LOCAL; IF SIZEOF(the_bag) > 0 THEN REPEAT i := 1 TO HIINDEX(the_bag); the_set := the_set + the_bag[i]; END_REPEAT; END_IF; RETURN (the_set);