/[eiffelstudio]/FreeELKS/trunk/library/kernel/natural_64.e
ViewVC logotype

Annotation of /FreeELKS/trunk/library/kernel/natural_64.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 91447 - (hide annotations)
Tue Jan 10 13:22:04 2006 UTC (14 years, 1 month ago) by ericb
File size: 3955 byte(s)
Added NATURAL classes

1 ericb 91447 indexing
2     description: "Unsigned integer values coded on 64 bits"
3     library: "Free implementation of ELKS library"
4     copyright: "Copyright (c) 1986-2005, Eiffel Software and others"
5     license: "Eiffel Forum License v2 (see forum.txt)"
6     date: "$Date$"
7     revision: "$Revision$"
8    
9     expanded class NATURAL_64
10    
11     inherit
12     NATURAL_64_REF
13     redefine
14     infix "<",
15     infix "+",
16     infix "-",
17     infix "*",
18     infix "/",
19     prefix "+",
20     infix "//",
21     infix "\\",
22     infix "^",
23     as_natural_8,
24     as_natural_16,
25     as_natural_32,
26     as_natural_64,
27     as_integer_8,
28     as_integer_16,
29     as_integer_32,
30     as_integer_64,
31     to_real_32,
32     to_real_64,
33     to_character,
34     bit_and,
35     bit_or,
36     bit_xor,
37     bit_not,
38     bit_shift_left,
39     bit_shift_right
40     end
41    
42     create
43     default_create,
44     make_from_reference
45    
46     convert
47     make_from_reference ({NATURAL_64_REF}),
48     to_reference: {NATURAL_64_REF, NUMERIC, COMPARABLE, PART_COMPARABLE, HASHABLE, ANY},
49     to_real_32: {REAL},
50     to_real_64: {DOUBLE}
51    
52     feature -- Comparison
53    
54     infix "<" (other: like Current): BOOLEAN is
55     -- Is current integer less than `other'?
56     external
57     "built_in"
58     end
59    
60     feature -- Basic operations
61    
62     infix "+" (other: like Current): like Current is
63     -- Sum with `other'
64     external
65     "built_in"
66     end
67    
68     infix "-" (other: like Current): like Current is
69     -- Result of subtracting `other'
70     external
71     "built_in"
72     end
73    
74     infix "*" (other: like Current): like Current is
75     -- Product by `other'
76     external
77     "built_in"
78     end
79    
80     infix "/" (other: like Current): DOUBLE is
81     -- Division by `other'
82     external
83     "built_in"
84     end
85    
86     prefix "+": like Current is
87     -- Unary plus
88     external
89     "built_in"
90     end
91    
92     infix "//" (other: like Current): like Current is
93     -- Integer division of Current by `other'
94     external
95     "built_in"
96     end
97    
98     infix "\\" (other: like Current): like Current is
99     -- Remainder of the integer division of Current by `other'
100     external
101     "built_in"
102     end
103    
104     infix "^" (other: DOUBLE): DOUBLE is
105     -- Integer power of Current by `other'
106     external
107     "built_in"
108     end
109    
110     feature -- Conversion
111    
112     as_natural_8: NATURAL_8 is
113     -- Convert `item' into an NATURAL_8 value.
114     external
115     "built_in"
116     end
117    
118     as_natural_16: NATURAL_16 is
119     -- Convert `item' into an NATURAL_16 value.
120     external
121     "built_in"
122     end
123    
124     as_natural_32: NATURAL_32 is
125     -- Convert `item' into an NATURAL_32 value.
126     external
127     "built_in"
128     end
129    
130     as_natural_64: NATURAL_64 is
131     -- Convert `item' into an NATURAL_64 value.
132     external
133     "built_in"
134     end
135    
136     as_integer_8: INTEGER_8 is
137     -- Convert `item' into an INTEGER_8 value.
138     external
139     "built_in"
140     end
141    
142     as_integer_16: INTEGER_16 is
143     -- Convert `item' into an INTEGER_16 value.
144     external
145     "built_in"
146     end
147    
148     as_integer_32: INTEGER is
149     -- Convert `item' into an INTEGER_32 value.
150     external
151     "built_in"
152     end
153    
154     as_integer_64: INTEGER_64 is
155     -- Convert `item' into an INTEGER_64 value.
156     external
157     "built_in"
158     end
159    
160     to_real_32: REAL is
161     -- Convert `item' into a REAL
162     external
163     "built_in"
164     end
165    
166     to_real_64: DOUBLE is
167     -- Convert `item' into a DOUBLE
168     external
169     "built_in"
170     end
171    
172     to_character: CHARACTER is
173     -- Returns corresponding ASCII character to `item' value.
174     external
175     "built_in"
176     end
177    
178     feature -- Bit operations
179    
180     bit_and (i: like Current): like Current is
181     -- Bitwise and between Current' and `i'.
182     external
183     "built_in"
184     end
185    
186     bit_or (i: like Current): like Current is
187     -- Bitwise or between Current' and `i'.
188     external
189     "built_in"
190     end
191    
192     bit_xor (i: like Current): like Current is
193     -- Bitwise xor between Current' and `i'.
194     external
195     "built_in"
196     end
197    
198     bit_not: like Current is
199     -- One's complement of Current.
200     external
201     "built_in"
202     end
203    
204     bit_shift_left (n: INTEGER): like Current is
205     -- Shift Current from `n' position to left.
206     external
207     "built_in"
208     end
209    
210     bit_shift_right (n: INTEGER): like Current is
211     -- Shift Current from `n' position to right.
212     external
213     "built_in"
214     end
215    
216     end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23