equal
deleted
inserted
replaced
160 |
160 |
161 " |
161 " |
162 ! ! |
162 ! ! |
163 |
163 |
164 !FixedPoint class methodsFor:'instance creation'! |
164 !FixedPoint class methodsFor:'instance creation'! |
|
165 |
|
166 fromSchemaString: aString |
|
167 "Answer an instance. (keeping the scale)" |
|
168 |
|
169 #swAdded. |
|
170 |
|
171 Smalltalk isSmalltalkX ifTrue:[ |
|
172 ^super fromString: aString |
|
173 ]. |
|
174 ^super fromString: aString , 's' |
|
175 ! |
165 |
176 |
166 numerator:n denominator:d |
177 numerator:n denominator:d |
167 "redefined to block the inherited instance creation method from fraction. |
178 "redefined to block the inherited instance creation method from fraction. |
168 Raises an error - you must give a scale" |
179 Raises an error - you must give a scale" |
169 |
180 |
305 "return the character used to print between mantissa an exponent. |
316 "return the character used to print between mantissa an exponent. |
306 Also used by the scanner when reading numbers." |
317 Also used by the scanner when reading numbers." |
307 |
318 |
308 ^ $s |
319 ^ $s |
309 ! ! |
320 ! ! |
|
321 |
310 |
322 |
311 !FixedPoint methodsFor:'accessing'! |
323 !FixedPoint methodsFor:'accessing'! |
312 |
324 |
313 scale |
325 scale |
314 "return the number of places of significance that is carried by the receiver." |
326 "return the number of places of significance that is carried by the receiver." |
1282 scale := newScale. |
1294 scale := newScale. |
1283 |
1295 |
1284 "Modified: 12.4.1997 / 11:22:02 / cg" |
1296 "Modified: 12.4.1997 / 11:22:02 / cg" |
1285 ! ! |
1297 ! ! |
1286 |
1298 |
|
1299 |
1287 !FixedPoint methodsFor:'testing'! |
1300 !FixedPoint methodsFor:'testing'! |
1288 |
1301 |
1289 isFixedPoint |
1302 isFixedPoint |
1290 "return true, if the receiver is some kind of fixedPoint number; |
1303 "return true, if the receiver is some kind of fixedPoint number; |
1291 true is returned here - the method is redefined from Object." |
1304 true is returned here - the method is redefined from Object." |
1341 ! ! |
1354 ! ! |
1342 |
1355 |
1343 !FixedPoint class methodsFor:'documentation'! |
1356 !FixedPoint class methodsFor:'documentation'! |
1344 |
1357 |
1345 version |
1358 version |
1346 ^ '$Id: FixedPoint.st 10473 2009-10-24 15:48:19Z vranyj1 $' |
1359 ^ '$Id: FixedPoint.st 10501 2010-02-13 23:34:44Z vranyj1 $' |
1347 ! ! |
1360 ! |
1348 |
1361 |
|
1362 version_CVS |
|
1363 ^ '§Header: /cvs/stx/stx/libbasic/FixedPoint.st,v 1.44 2010/02/10 17:46:09 cg Exp §' |
|
1364 ! ! |
|
1365 |
|
1366 |