|
FUNCTION simplify_maths_value (val : maths_value) : maths_value; LOCAL vtypes : SET OF STRING := stripped_typeof ( val ) ; vlist : LIST OF maths_value ; nlist : LIST OF maths_value := [ ] ; END_LOCAL ; IF 'generic_expression' IN vtypes THEN RETURN ( simplify_generic_expression ( val ) ) ; END_IF ; IF 'list' IN vtypes THEN vlist := val ; REPEAT i := 1 TO SIZEOF ( vlist ) ; INSERT ( nlist , simplify_maths_value ( vlist [ i ] ) , i - 1 ) ; END_REPEAT ; RETURN ( convert_to_maths_value ( nlist ) ) ; END_IF ; RETURN ( val ) ; END_FUNCTION; -- simplify_maths_value |
|
public class FSimplify_maths_value public static Value run(SdaiContext _context, Value val) |