
  PROCEDURE [INLINE] clp$evaluate_numeric_expression
    (VAR work_area {input} : ^clt$work_area;
     VAR parse {input, output} : clt$parse_state;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

?? PUSH (LISTEXT := ON) ??

    VAR
      ignore_result_type_description: ^clt$type_description,
      members: array [1 .. 2] of clt$type_description,
      original_work_area: ^clt$work_area,
      type_description: clt$type_description,
      union_info: clt$union_type_information;


    status.normal := TRUE;
    result := NIL;

    type_description.specification := NIL;
    type_description.name := NIL;
    type_description.derived_from_value_kind_spec := FALSE;
    type_description.advanced_keywords_present := FALSE;
*IF NOT $true(osv$unix)
    type_description.kinds := $clt$type_kinds
*ELSE
    type_description.kinds := $clt$type_kinds_v2
*IFEND
          [clc$integer_type, clc$real_type];
    type_description.kind := clc$union_type;
    type_description.member_descriptions := ^members;
    type_description.union_information := ^union_info;

    union_info.only_standard_types_in_union := TRUE;
    union_info.min_integer_value := clc$min_integer;
    union_info.max_integer_value := clc$max_integer;
    union_info.default_radix := 10;
*IF NOT $true(osv$unix)
    #UNCHECKED_CONVERSION (clv$negative_infinity^,
          union_info.min_real_value.long_real);
    #UNCHECKED_CONVERSION (clv$positive_infinity^,
          union_info.max_real_value.long_real);
*ELSE
    union_info.min_real_value.long_real := clv$negative_infinity^;
    union_info.max_real_value.long_real := clv$positive_infinity^;
*IFEND

    members [1].specification := NIL;
    members [1].name := NIL;
    members [1].derived_from_value_kind_spec := FALSE;
    members [1].advanced_keywords_present := FALSE;
*IF NOT $true(osv$unix)
    members [1].kinds := $clt$type_kinds [clc$integer_type];
*ELSE
    members [1].kinds := $clt$type_kinds_v2 [clc$integer_type];
*IFEND
    members [1].kind := clc$integer_type;
    members [1].min_integer_value := clc$min_integer;
    members [1].max_integer_value := clc$max_integer;
    members [1].default_radix := 10;

    members [2].specification := NIL;
    members [2].name := NIL;
    members [2].derived_from_value_kind_spec := FALSE;
    members [2].advanced_keywords_present := FALSE;
*IF NOT $true(osv$unix)
    members [2].kinds := $clt$type_kinds [clc$real_type];
*ELSE
    members [2].kinds := $clt$type_kinds_v2 [clc$real_type];
*IFEND
    members [2].kind := clc$real_type;
*IF NOT $true(osv$unix)
    #UNCHECKED_CONVERSION (clv$negative_infinity^,
          members [2].min_real_value.long_real);
    #UNCHECKED_CONVERSION (clv$positive_infinity^,
          members [2].max_real_value.long_real);
*ELSE
    members [2].min_real_value.long_real := clv$negative_infinity^;
    members [2].max_real_value.long_real := clv$positive_infinity^;
*IFEND

    original_work_area := work_area;
    clp$internal_evaluate_expr (parse, ^type_description, work_area,
          ignore_result_type_description, result, status);
    work_area := original_work_area;

    IF status.normal AND (result^.kind = clc$unspecified) THEN
      osp$set_status_abnormal ('CL', cle$unspecified_value_for_req,
            'clp$evaluate_expression', status);
    IFEND;

  PROCEND clp$evaluate_numeric_expression;

*copyc clc$max_integer
*copyc clc$min_integer
*copyc cle$ecc_parsing
*copyc clt$data_value
*copyc clt$parse_state
*copyc clt$work_area
*copyc ost$status
?? POP ??
*copyc clp$internal_evaluate_expr
*copyc clv$negative_infinity
*copyc clv$positive_infinity
*copyc osp$set_status_abnormal
