/[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 274 - (show annotations)
Fri Jul 9 15:22:19 1993 UTC (26 years, 6 months ago) by grator
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/real_a.e
File size: 1438 byte(s)
*** empty log message ***

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23