/[eiffelstudio]/branches/eth/eve/Src/Eiffel/API/evaluated_type/real_a.e
ViewVC logotype

Contents of /branches/eth/eve/Src/Eiffel/API/evaluated_type/real_a.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3375 - (show annotations)
Mon Dec 4 11:38:01 1995 UTC (24 years, 1 month ago) by dinov
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/real_a.e
File size: 1692 byte(s)
cosmetics (indexing, feature clauses, comments)

1 indexing
2
3 description:
4 "Actual type for real type.";
5 date: "$Date$";
6 revision: "$Revision $"
7
8 class REAL_A
9
10 inherit
11
12 BASIC_A
13 rename
14 internal_conform_to as old_conform_to
15 redefine
16 is_real, associated_class, same_as, is_numeric, heaviest,
17 associated_eclass
18 end;
19 BASIC_A
20 redefine
21 is_real, associated_class, same_as, is_numeric, heaviest,
22 internal_conform_to, associated_eclass
23 select
24 internal_conform_to
25 end
26
27 feature -- Property
28
29 is_real: BOOLEAN is
30 -- Is the current type a real type ?
31 do
32 Result := True;
33 end;
34
35 feature -- Access
36
37 associated_eclass: E_CLASS is
38 -- Associated eiffel class
39 once
40 Result := System.real_class.compiled_eclass;
41 end;
42
43 feature {COMPILER_EXPORTER}
44
45 internal_conform_to (other: TYPE_A; in_generics: BOOLEAN): BOOLEAN is
46 -- Does `other' conform to Current ?
47 do
48 if in_generics then
49 Result := other.is_real;
50 else
51 Result := old_conform_to (other, False)
52 or else
53 other.actual_type.is_double
54 end;
55 end;
56
57 is_numeric: BOOLEAN is
58 -- Is the current type a numeric type ?
59 do
60 Result := True;
61 end;
62
63 heaviest (type: TYPE_A): TYPE_A is
64 -- Heaviest numeric type for balancing rule
65 do
66 if type.is_double then
67 Result := type
68 else
69 Result := Current
70 end;
71 end;
72
73 type_i: FLOAT_I is
74 -- C type
75 once
76 Result := Float_c_type;
77 end;
78
79 associated_class: CLASS_C is
80 -- Class REAL
81 require else
82 real_class_compiled: System.real_class.compiled
83 once
84 Result := System.real_class.compiled_class;
85 end;
86
87 same_as (other: TYPE_A): BOOLEAN is
88 -- Is the current type the same as `other' ?
89 do
90 Result := other.is_real;
91 end;
92
93 end -- class REAL_A

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23