eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SignedIntegerArray':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: SignedIntegerArray


Inheritance:

   Object
   |
   +--Collection
      |
      +--SequenceableCollection
         |
         +--ArrayedCollection
            |
            +--UninterpretedBytes
               |
               +--AbstractNumberVector
                  |
                  +--UnboxedIntegerArray
                     |
                     +--SignedIntegerArray

Package:
stx:libbasic
Category:
Collections-Arrayed
Version:
rev: 1.9 date: 2022/08/10 10:06:52
user: cg
file: SignedIntegerArray.st directory: libbasic
module: stx stc-classLibrary: libbasic

Description:


SignedIntegerArrays store 32bit signed integers in the range 16r-80000000..16r7FFFFFFF.
In contrast to normal arrays (which store pointers to their elements),
signedIntegerArrays store the values in a dense & compact way. 
Since the representation fits the underlying C-language systems representation
of signed int32's, this is also useful to pass bulk data to c primitive code.

SignedIntegerArrays can be used as literals i.e. you can enter SignedIntegerArray-constants as: 
    #s32( element1 element2 .... elementN ) 
for example:
    #s32(-1 10 -128 127 0x7FFF -0x8000)

Aliased as Int32Array.

[memory requirements:]
    OBJ-HEADER + (size * 4)


[caveat:]
    should probably be renamed to Int32Array
    (there is an alias named 'Int32Array', but when inspected,
    it presents itself as SignedIntegerArray)

copyright

COPYRIGHT (c) 1997 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

queries
o  elementByteSize
for bit-like containers, return the number of bytes stored per element.
Here, 4 is returned

o  literalTokenPrefix

o  maxVal
the maximum value which can be stored in instances of me.
For SignedIntegerArrays, this is 2147483647, eg. 16r7FFFFFFF (largest 32bit signed int)

o  minVal
the minimum value which can be stored in instances of me.
For SignedIntegerArrays, this is -2147483648 eg. -16r80000000 (smallest 32bit signed int)



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 08:29:45 GMT