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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23