/[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 37662 - (show 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 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 BASIC_A
12 redefine
13 is_real, associated_class, same_as, is_numeric, heaviest,
14 internal_conform_to
15 end
16
17 feature -- Property
18
19 is_real: BOOLEAN is True
20 -- Is the current type a real type ?
21
22 associated_class: CLASS_C is
23 -- Class REAL
24 once
25 Result := System.real_class.compiled_class
26 end
27
28 feature {COMPILER_EXPORTER}
29
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 Result := other.is_real
35 else
36 Result := precursor {BASIC_A} (other, False)
37 or else
38 other.actual_type.is_double
39 end
40 end
41
42 is_numeric: BOOLEAN is True
43 -- Is the current type a numeric type ?
44
45 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
55 type_i: FLOAT_I is
56 -- C type
57 do
58 create Result
59 end
60
61 same_as (other: TYPE_A): BOOLEAN is
62 -- Is the current type the same as `other' ?
63 do
64 Result := other.is_real
65 end
66
67 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