Project

General

Profile

Revision e8f55c25 src/backends/Ada/ada_backend_common.ml

View differences:

src/backends/Ada/ada_backend_common.ml
124 124
**)
125 125
let default_ada_cst cst_typ = match cst_typ with
126 126
  | Types.Basic.Tint  -> Const_int 0
127
  | Types.Basic.Treal -> Const_real (Num.num_of_int 0, 0, "0.0")
127
  | Types.Basic.Treal -> Const_real Real.zero
128 128
  | Types.Basic.Tbool -> Const_tag tag_false
129 129
  | _ -> assert false
130 130

  
......
200 200
let pp_ada_const fmt c =
201 201
  match c with
202 202
  | Const_int i                     -> pp_print_int fmt i
203
  | Const_real (c, e, s)            ->
204
      fprintf fmt "%s.0*1.0e-%i" (Num.string_of_num c) e
203
  | Const_real r                    -> Real.pp_ada fmt r
205 204
  | Const_tag t                     -> pp_ada_tag fmt t
206 205
  | Const_string _ | Const_modeid _ ->
207 206
    (Format.eprintf

Also available in: Unified diff