Array.st
changeset 4062 4959de96b06f
parent 3979 46a2da9b917d
child 4122 7e3b6b267c06
equal deleted inserted replaced
4061:ef62e88fd0ac 4062:4959de96b06f
    55     However, subclassing is allowed of course 
    55     However, subclassing is allowed of course 
    56     - even with added named instance variables.
    56     - even with added named instance variables.
    57 
    57 
    58     Literal arrays (i.e. array-constants) are entered in source as:
    58     Literal arrays (i.e. array-constants) are entered in source as:
    59 
    59 
    60 	#( element1 element2 ... element-n)
    60         #( element1 element2 ... element-n)
    61 
    61 
    62     where each element must be itself a literal constant.
    62     where each element must be itself a literal constant.
    63     Array, symbol and byteArray constants within an array can be written
    63     Array, symbol and byteArray constants within an array can be written
    64     without the initial #-character.
    64     without the initial #-character.
    65     In addition, true, false and nil are also allowed as array-literal.
    65     In addition, true, false and nil are also allowed as array-literal.
    70       #('foo' #(1 2) #foo)    -> 3 elements: a String, another array and a symbol
    70       #('foo' #(1 2) #foo)    -> 3 elements: a String, another array and a symbol
    71       #('foo' (1 2) foo)      -> same as above
    71       #('foo' (1 2) foo)      -> same as above
    72       #(nil true #true)       -> 3 elements: nil, true and a symbol (watch out)
    72       #(nil true #true)       -> 3 elements: nil, true and a symbol (watch out)
    73       #(two [3 3 3] (4 4 4))  -> 3 elements: a symbol, a byteArray and another array
    73       #(two [3 3 3] (4 4 4))  -> 3 elements: a symbol, a byteArray and another array
    74 
    74 
       
    75     [memory requirements:]
       
    76         OBJ-HEADER + (size * ptr-size)
       
    77 
    75     [warning:]
    78     [warning:]
    76 	read the warning about 'growing fixed size collection'
    79         read the warning about 'growing fixed size collection'
    77 	in ArrayedCollection's documentation
    80         in ArrayedCollection's documentation
    78 
    81 
    79     [author:]
    82     [author:]
    80 	Claus Gittinger
    83         Claus Gittinger
    81 
    84 
    82     [see also:]
    85     [see also:]
    83 	OrderedCollection
    86         OrderedCollection
    84 	ByteArray FloatArray DoubleArray
    87         ByteArray FloatArray DoubleArray
    85 	String
    88         String
    86 "
    89 "
    87 ! !
    90 ! !
    88 
    91 
    89 !Array class methodsFor:'instance creation'!
    92 !Array class methodsFor:'instance creation'!
    90 
    93 
  2312 ! !
  2315 ! !
  2313 
  2316 
  2314 !Array class methodsFor:'documentation'!
  2317 !Array class methodsFor:'documentation'!
  2315 
  2318 
  2316 version
  2319 version
  2317     ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.111 1999-02-12 14:53:18 cg Exp $'
  2320     ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.112 1999-03-19 20:42:23 cg Exp $'
  2318 ! !
  2321 ! !