FUNCTION convert_to_literal

(* SCHEMA step_merged_ap_schema; *)
-- IN AP238 STEP-NC/AP242
FUNCTION convert_to_literal
      (val : maths_atom ) : generic_literal;
   LOCAL
      types : SET OF STRING := TYPEOF(val);
   END_LOCAL;
      IF 'INTEGER' IN types THEN
         RETURN (make_int_literal(val));
      END_IF;
      IF 'REAL' IN types THEN
         RETURN (make_real_literal(val));
      END_IF;
      IF 'BOOLEAN' IN types THEN
         RETURN (make_boolean_literal(val));
      END_IF;
      IF 'STRING' IN types THEN
         RETURN (make_string_literal(val));
      END_IF;
      IF 'LOGICAL' IN types THEN
         RETURN (make_logical_literal(val));
      END_IF;
      IF 'BINARY' IN types THEN
         RETURN (make_binary_literal(val));
      END_IF;
      IF schema_prefix + 'MATHS_ENUM_ATOM' IN types THEN
         RETURN (make_maths_enum_literal(val));
      END_IF;
      RETURN (?);
END_FUNCTION;

Referenced By

Defintion convert_to_literal is references by the following definitions:
DefinitionType
 convert_to_operand FUNCTION


[Top Level Definitions] [Exit]

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