/[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 37662 - (hide annotations)
Tue Jun 10 23:37:06 2003 UTC (16 years, 7 months ago) by julieng
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/real_a.e
File size: 1192 byte(s)
Replace creation keyword with create keyword.

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 manus 32513 is_real, associated_class, same_as, is_numeric, heaviest,
14 manus 11302 internal_conform_to
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 manus 11302 associated_class: CLASS_C is
23     -- Class REAL
24 dinov 3078 once
25 manus 11128 Result := System.real_class.compiled_class
26 manus 9656 end
27 dinov 3078
28 dinov 3181 feature {COMPILER_EXPORTER}
29 grator 18
30     internal_conform_to (other: TYPE_A; in_generics: BOOLEAN): BOOLEAN is
31     -- Does `other' conform to Current ?
32     do
33     if in_generics then
34 manus 9656 Result := other.is_real
35 grator 18 else
36 julieng 37662 Result := precursor {BASIC_A} (other, False)
37 grator 18 or else
38     other.actual_type.is_double
39 manus 9656 end
40     end
41 grator 18
42 manus 9656 is_numeric: BOOLEAN is True
43 grator 18 -- Is the current type a numeric type ?
44    
45 manus 32513 heaviest (t: TYPE_A): TYPE_A is
46     -- Heaviest numeric type for balancing rule.
47     do
48     if t.is_double then
49     Result := t
50     else
51     Result := Current
52     end
53     end
54 grator 18
55     type_i: FLOAT_I is
56     -- C type
57 manus 32079 do
58     create Result
59 manus 9656 end
60 grator 18
61     same_as (other: TYPE_A): BOOLEAN is
62     -- Is the current type the same as `other' ?
63     do
64 manus 9656 Result := other.is_real
65     end
66 grator 18
67 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