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

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23