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

Contents of /FreeELKS/trunk/library/kernel/natural_16.e

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23