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

Contents of /FreeELKS/trunk/library/kernel/integer_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: 4181 byte(s)
Synchronized with ISE 6.0.65740
1 indexing
2 description: "Integer values coded on 16 bits"
3 external_name: "System.Int16"
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 INTEGER_16 inherit
12
13 INTEGER_16_REF
14 redefine
15 infix "<",
16 infix "+",
17 infix "-",
18 infix "*",
19 infix "/",
20 prefix "+",
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,
34 to_double,
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 ({INTEGER_16_REF}),
51 to_real: {REAL},
52 to_double: {DOUBLE},
53 to_integer_32: {INTEGER},
54 to_integer_64: {INTEGER_64}
55
56 feature -- Comparison
57
58 infix "<" (other: like Current): BOOLEAN is
59 -- Is current integer less than `other'?
60 external
61 "built_in"
62 end
63
64 feature -- Basic operations
65
66 infix "+" (other: like Current): like Current is
67 -- Sum with `other'
68 external
69 "built_in"
70 end
71
72 infix "-" (other: like Current): like Current is
73 -- Result of subtracting `other'
74 external
75 "built_in"
76 end
77
78 infix "*" (other: like Current): like Current is
79 -- Product by `other'
80 external
81 "built_in"
82 end
83
84 infix "/" (other: like Current): DOUBLE is
85 -- Division by `other'
86 external
87 "built_in"
88 end
89
90 prefix "+": like Current is
91 -- Unary plus
92 external
93 "built_in"
94 end
95
96 prefix "-": like Current is
97 -- Unary minus
98 external
99 "built_in"
100 end
101
102 infix "//" (other: like Current): like Current is
103 -- Integer division of Current by `other'
104 external
105 "built_in"
106 end
107
108 infix "\\" (other: like Current): like Current is
109 -- Remainder of the integer division of Current by `other'
110 external
111 "built_in"
112 end
113
114 infix "^" (other: DOUBLE): DOUBLE is
115 -- Integer power of Current by `other'
116 external
117 "built_in"
118 end
119
120 feature -- Conversion
121
122 as_natural_8: NATURAL_8 is
123 -- Convert `item' into an NATURAL_8 value.
124 external
125 "built_in"
126 end
127
128 as_natural_16: NATURAL_16 is
129 -- Convert `item' into an NATURAL_16 value.
130 external
131 "built_in"
132 end
133
134 as_natural_32: NATURAL_32 is
135 -- Convert `item' into an NATURAL_32 value.
136 external
137 "built_in"
138 end
139
140 as_natural_64: NATURAL_64 is
141 -- Convert `item' into an NATURAL_64 value.
142 external
143 "built_in"
144 end
145
146 as_integer_8: INTEGER_8 is
147 -- Convert `item' into an INTEGER_8 value.
148 external
149 "built_in"
150 end
151
152 as_integer_16: INTEGER_16 is
153 -- Convert `item' into an INTEGER_16 value.
154 external
155 "built_in"
156 end
157
158 as_integer_32: INTEGER is
159 -- Convert `item' into an INTEGER_32 value.
160 external
161 "built_in"
162 end
163
164 as_integer_64: INTEGER_64 is
165 -- Convert `item' into an INTEGER_64 value.
166 external
167 "built_in"
168 end
169
170 to_real: REAL is
171 -- Convert `item' into a REAL
172 external
173 "built_in"
174 end
175
176 to_double: DOUBLE is
177 -- Convert `item' into a DOUBLE
178 external
179 "built_in"
180 end
181
182 to_character_8: CHARACTER_8 is
183 -- Associated character in 8 bit version.
184 external
185 "built_in"
186 end
187
188 to_character_32: CHARACTER_32 is
189 -- Associated character in 32 bit version.
190 external
191 "built_in"
192 end
193
194 feature -- Bit operations
195
196 bit_and (i: like Current): like Current is
197 -- Bitwise and between Current' and `i'.
198 external
199 "built_in"
200 end
201
202 bit_or (i: like Current): like Current is
203 -- Bitwise or between Current' and `i'.
204 external
205 "built_in"
206 end
207
208 bit_xor (i: like Current): like Current is
209 -- Bitwise xor between Current' and `i'.
210 external
211 "built_in"
212 end
213
214 bit_not: like Current is
215 -- One's complement of Current.
216 external
217 "built_in"
218 end
219
220 bit_shift_left (n: INTEGER): like Current is
221 -- Shift Current from `n' position to left.
222 external
223 "built_in"
224 end
225
226 bit_shift_right (n: INTEGER): like Current is
227 -- Shift Current from `n' position to right.
228 external
229 "built_in"
230 end
231
232 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23