/[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 296 - (show annotations)
Thu Aug 19 20:09:35 1993 UTC (26 years, 5 months ago) by grator
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/real_a.e
File size: 1381 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, associated_class, same_as, is_numeric, heaviest
12 end;
13 BASIC_A
14 redefine
15 is_real, 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 type_i: FLOAT_I is
58 -- C type
59 once
60 Result := Float_c_type;
61 end;
62
63 associated_class: CLASS_C is
64 -- Class REAL
65 require else
66 real_class_compiled: System.real_class.compiled
67 once
68 Result := System.real_class.compiled_class;
69 end;
70
71 same_as (other: TYPE_A): BOOLEAN is
72 -- Is the current type the same as `other' ?
73 do
74 Result := other.is_real;
75 end;
76
77 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23