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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11128 - (hide annotations)
Mon Aug 24 02:25:56 1998 UTC (21 years, 5 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/real_a.e
File size: 1437 byte(s)
We removed E_CLASS from the system, we should now use CLASS_C instead.

1 dinov 3375 indexing
2 grator 18
3 dinov 3375 description:
4 manus 9656 "Actual type for real type."
5     date: "$Date$"
6 dinov 3375 revision: "$Revision $"
7    
8 grator 18 class REAL_A
9    
10     inherit
11     BASIC_A
12     redefine
13 dinov 3078 is_real, associated_class, same_as, is_numeric, heaviest,
14     internal_conform_to, associated_eclass
15 grator 18 end
16    
17 dinov 3078 feature -- Property
18    
19 manus 9656 is_real: BOOLEAN is True
20 dinov 3078 -- Is the current type a real type ?
21    
22 dinov 3181 feature -- Access
23    
24 manus 11128 associated_eclass: CLASS_C is
25 dinov 3078 -- Associated eiffel class
26     once
27 manus 11128 Result := System.real_class.compiled_class
28 manus 9656 end
29 dinov 3078
30 dinov 3181 feature {COMPILER_EXPORTER}
31 grator 18
32     internal_conform_to (other: TYPE_A; in_generics: BOOLEAN): BOOLEAN is
33     -- Does `other' conform to Current ?
34     do
35     if in_generics then
36 manus 9656 Result := other.is_real
37 grator 18 else
38 manus 9656 Result := {BASIC_A} precursor (other, False)
39 grator 18 or else
40     other.actual_type.is_double
41 manus 9656 end
42     end
43 grator 18
44 manus 9656 is_numeric: BOOLEAN is True
45 grator 18 -- Is the current type a numeric type ?
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 manus 9656 end
55     end
56 grator 18
57     type_i: FLOAT_I is
58     -- C type
59     once
60 manus 9656 Result := Float_c_type
61     end
62 grator 18
63     associated_class: CLASS_C is
64     -- Class REAL
65 grator 274 require else
66     real_class_compiled: System.real_class.compiled
67 grator 18 once
68 manus 9656 Result := System.real_class.compiled_class
69     end
70 grator 18
71     same_as (other: TYPE_A): BOOLEAN is
72     -- Is the current type the same as `other' ?
73     do
74 manus 9656 Result := other.is_real
75     end
76 grator 18
77 dinov 3375 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