author | Claus Gittinger <cg@exept.de> |
Mon, 04 Jun 2007 21:44:03 +0200 | |
changeset 1885 | 4d424e94093c |
parent 1414 | e801d1248f10 |
child 2645 | 1950f0398db0 |
permissions | -rw-r--r-- |
1414
e801d1248f10
printing code shared for 16- and 32bit arrays
Claus Gittinger <cg@exept.de>
parents:
1396
diff
changeset
|
1 |
"{ Encoding: iso8859-1 }" |
e801d1248f10
printing code shared for 16- and 32bit arrays
Claus Gittinger <cg@exept.de>
parents:
1396
diff
changeset
|
2 |
|
376 | 3 |
" |
4 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
5 |
All Rights Reserved |
|
6 |
||
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
14 |
||
1177 | 15 |
"{ Package: 'stx:libbasic2' }" |
16 |
||
17 |
UnboxedIntegerArray variableWordSubclass:#WordArray |
|
376 | 18 |
instanceVariableNames:'' |
19 |
classVariableNames:'' |
|
20 |
poolDictionaries:'' |
|
21 |
category:'Collections-Arrayed' |
|
22 |
! |
|
23 |
||
24 |
!WordArray class methodsFor:'documentation'! |
|
25 |
||
26 |
copyright |
|
27 |
" |
|
28 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
29 |
All Rights Reserved |
|
30 |
||
31 |
This software is furnished under a license and may be used |
|
32 |
only in accordance with the terms of that license and with the |
|
33 |
inclusion of the above copyright notice. This software may not |
|
34 |
be provided or otherwise made available to, or used by, any |
|
35 |
other person. No title to or ownership of the software is |
|
36 |
hereby transferred. |
|
37 |
" |
|
38 |
! |
|
39 |
||
40 |
documentation |
|
41 |
" |
|
42 |
WordArrays store integers in the range 0..16rFFFF. |
|
43 |
In contrast to normal arrays (which store pointers to their elements), |
|
44 |
wordArrays store the values in a dense & compact way. |
|
1177 | 45 |
Since the representation fits the underlying C-language systems representation |
46 |
of unsigned int16's, this is also useful to pass bulk data to c primitive code. |
|
47 |
||
48 |
WordArrays can be used to hold bulk integer data in a more compact way. |
|
736 | 49 |
For example: |
50 |
Array new:100000 withAll:1 |
|
51 |
requires 400k of object memory; |
|
376 | 52 |
|
736 | 53 |
in contrast, |
54 |
WordArray new:100000 withAll:1 |
|
55 |
only requires half of it. |
|
56 |
||
57 |
[memory requirements:] |
|
58 |
OBJ-HEADER + (size * 2) |
|
376 | 59 |
|
60 |
[see also:] |
|
736 | 61 |
ByteArray BooleanArray FloatArray DoubleArray Array |
62 |
SignedWordArray |
|
376 | 63 |
|
64 |
[author:] |
|
736 | 65 |
Claus Gittinger |
376 | 66 |
" |
67 |
! ! |
|
68 |
||
69 |
!WordArray class methodsFor:'documentation'! |
|
70 |
||
71 |
version |
|
1414
e801d1248f10
printing code shared for 16- and 32bit arrays
Claus Gittinger <cg@exept.de>
parents:
1396
diff
changeset
|
72 |
^ '$Header: /cvs/stx/stx/libbasic2/WordArray.st,v 1.6 2004-03-03 20:49:21 cg Exp $' |
376 | 73 |
! ! |