FUNCTION derive_finite_function_range
(pairs : SET [1:?] OF LIST [2:2] OF maths_value) : tuple_space;
LOCAL result : SET OF maths_value := []; END_LOCAL; -- An ambiguity IN ISO 10303-11:1994 pages 99-101 leaves the result OF the following -- three lines ambiguous IN those cases WHERE an operand is simultaneously a member -- OF the base TYPE AND the AGGREGATE type. -- REPEAT i := 1 TO SIZEOF (pairs); -- result := result + pairs[i][2]; -- END_REPEAT; -- The next line unions an empty SET AND the desired LIST TO get the desired set. result := result + list_selected_components (pairs, 2); RETURN (one_tuples_of (make_finite_space (result))); END_FUNCTION; -- derive_finite_function_range
|