FUNCTION used_variables

(* SCHEMA step_merged_ap_schema; *)
-- IN AP242
FUNCTION used_variables
      (arg : generic_expression ) : SET OF generic_variable;
   LOCAL
      result : SET OF generic_variable := [];
   END_LOCAL;
      IF 'STEP_MERGED_AP_SCHEMA.GENERIC_VARIABLE' IN TYPEOF(arg) THEN
         RETURN ([ arg ]);
      END_IF;
      IF 'STEP_MERGED_AP_SCHEMA.UNARY_GENERIC_EXPRESSION' IN TYPEOF(arg) THEN
         RETURN (used_variables(arg\unary_generic_expression.operand));
      END_IF;
      IF 'STEP_MERGED_AP_SCHEMA.BINARY_GENERIC_EXPRESSION' IN TYPEOF(arg) THEN
         RETURN (used_variables(arg\binary_generic_expression.operands[1]) + used_variables(arg\binary_generic_expression.operands[2]));
      END_IF;
      IF 'STEP_MERGED_AP_SCHEMA.MULTIPLE_ARITY_GENERIC_EXPRESSION' IN TYPEOF(arg) THEN
         REPEAT i := 1 TO SIZEOF(arg\multiple_arity_generic_expression.operands);
            result := result + used_variables(arg\multiple_arity_generic_expression.operands[i]);
         END_REPEAT;
         RETURN (result);
      END_IF;
      RETURN ([]);
END_FUNCTION;

Referenced By

Defintion used_variables is references by the following definitions:
DefinitionType
 free_form_assignment ENTITY
 free_form_relation ENTITY


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2024-09-06T14:00:33-04:00