|
FUNCTION list_selected_components (aggr : AGGREGATE OF LIST [0:?] OF maths_value, k : positive_integer) : LIST [0:?] OF maths_value; LOCAL result : LIST OF maths_value := [ ] ; j : INTEGER := 0 ; END_LOCAL ; REPEAT i := LOINDEX ( aggr ) TO HIINDEX ( aggr ) ; IF k <= SIZEOF ( aggr [ i ] ) THEN INSERT ( result , aggr [ i ] [ k ] , j ) ; j := j + 1 ; END_IF ; END_REPEAT ; RETURN ( result ) ; END_FUNCTION; -- list_selected_components |
|
public class FList_selected_components public static Value run(SdaiContext _context, Value aggr, Value k) |