This is gst-base.info, produced by makeinfo version 4.8 from
/home/bonzinip/smalltalk--stable--2.2--patch-3/+build/doc/../../doc/gst-base-fixed.texi.

INFO-DIR-SECTION GNU Smalltalk
START-INFO-DIR-ENTRY
* Base classes: (gst-base).             The GNU Smalltalk base classes.
END-INFO-DIR-ENTRY

   This file documents GNU Smalltalk Version 2.2.  It was last updated
on 21 November 2005.

   Copyright (C) 1988-92, 1994-95, 1999-2001 Free Software Foundation,
Inc.

   This document is released under the terms of the GNU Free
Documentation License as published by the Free Software Foundation;
either version 1.1, or (at your option) any later version.

   You should have received a copy of the GNU Free Documentation
License along with GNU Smalltalk; see the file `COPYING.DOC'.  If not,
write to the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.

   There are no Cover Texts and no Invariant Sections; this text, along
with its equivalent in the printed manual, constitutes the Title Page.


File: gst-base.info,  Node: Float-built ins,  Next: Float-coercing,  Prev: Float-basic,  Up: Float

1.75.5 Float: built ins
-----------------------

arcCos
     Answer the arc-cosine of the receiver

arcSin
     Answer the arc-sine of the receiver

arcTan
     Answer the arc-tangent of the receiver

ceiling
     Answer the integer part of the receiver, truncated towards
     +infinity

cos
     Answer the cosine of the receiver

exp
     Answer 'e' (2.718281828459...) raised to the receiver

floor
     Answer the integer part of the receiver, truncated towards
     -infinity

ln
     Answer the logarithm of the receiver in base 'e'
     (2.718281828459...)

primHash
     Private - Answer an hash value for the receiver

raisedTo: aNumber
     Answer the receiver raised to its aNumber power

sin
     Answer the sine of the receiver

sqrt
     Answer the square root of the receiver

tan
     Answer the tangent of the receiver



File: gst-base.info,  Node: Float-coercing,  Next: Float-comparing,  Prev: Float-built ins,  Up: Float

1.75.6 Float: coercing
----------------------

asExactFraction
     Convert the receiver into a fraction with optimal approximation,
     but with usually huge terms.

asFraction
     Convert the receiver into a fraction with a good (but undefined)
     approximation

truncated
     Convert the receiver to an Integer.  Only used for LargeIntegers,
     there are primitives for the other cases.



File: gst-base.info,  Node: Float-comparing,  Next: Float-printing,  Prev: Float-coercing,  Up: Float

1.75.7 Float: comparing
-----------------------

max: aNumber
     Answer the maximum between the receiver and aNumber.  Redefine in
     subclasses if necessary to ensure that if either self or aNumber
     is a NaN, it is always answered.

min: aNumber
     Answer the minimum between the receiver and aNumber.  Redefine in
     subclasses if necessary to ensure that if either self or aNumber
     is a NaN, it is always answered.

withSignOf: aNumber
     Answer the receiver, with its sign possibly changed to match that
     of aNumber.



File: gst-base.info,  Node: Float-printing,  Next: Float-storing,  Prev: Float-comparing,  Up: Float

1.75.8 Float: printing
----------------------

printOn: aStream
     Print a representation of the receiver on aStream



File: gst-base.info,  Node: Float-storing,  Next: Float-testing,  Prev: Float-printing,  Up: Float

1.75.9 Float: storing
---------------------

storeOn: aStream
     Print a representation of the receiver on aStream



File: gst-base.info,  Node: Float-testing,  Next: Float-testing functionality,  Prev: Float-storing,  Up: Float

1.75.10 Float: testing
----------------------

isFinite
     Answer whether the receiver does not represent infinity, nor a NaN

isInfinite
     Answer whether the receiver represents positive or negative
     infinity

isNaN
     Answer whether the receiver represents a NaN

negative
     Answer whether the receiver is negative

positive
     Answer whether the receiver is positive.  Negative zero is not
     positive, so the definition is not simply >= 0.

sign
     Answer 1 if the receiver is greater than 0, -1 if less than 0,
     else 0.  Negative zero is the same as positive zero.

strictlyPositive
     Answer whether the receiver is > 0



File: gst-base.info,  Node: Float-testing functionality,  Next: Float-transcendental operations,  Prev: Float-testing,  Up: Float

1.75.11 Float: testing functionality
------------------------------------

isFloat
     Answer `true'.



File: gst-base.info,  Node: Float-transcendental operations,  Prev: Float-testing functionality,  Up: Float

1.75.12 Float: transcendental operations
----------------------------------------

asFloat
     Just defined for completeness.  Return the receiver.

estimatedLog
     Answer an estimate of (self abs floorLog: 10)

log
     Not commented.



File: gst-base.info,  Node: FloatD,  Next: FloatE,  Prev: Float,  Up: Base classes

1.76 FloatD
===========

Defined in namespace Smalltalk
Superclass: Float
Category: Language-Data types
     My instances represent floating point numbers that have 64 bits of
     precision (well, less than that in precision; they are precisely
     the same as C's "double" datatype).  Besides the standard
     numerical operations, I provide transcendental operations too.

* Menu:

* FloatD class-byte-order dependancies::  (class)
* FloatD class-characterization::  (class)
* FloatD class-converting::  (class)
* FloatD-built ins::  (instance)
* FloatD-coercing::  (instance)


File: gst-base.info,  Node: FloatD class-byte-order dependancies,  Next: FloatD class-characterization,  Up: FloatD

1.76.1 FloatD class: byte-order dependancies
--------------------------------------------

signByte
     Answer the byte of the receiver that contains the sign bit



File: gst-base.info,  Node: FloatD class-characterization,  Next: FloatD class-converting,  Prev: FloatD class-byte-order dependancies,  Up: FloatD

1.76.2 FloatD class: characterization
-------------------------------------

decimalDigits
     Return the number of decimal digits of precision for a FloatD.
     Technically, if P is the precision for the representation, then
     the decimal precision Q is the maximum number of decimal digits
     such that any floating point number with Q base 10 digits can be
     rounded to a floating point number with P base 2 digits and back
     again, without change to the Q decimal digits.

emax
     Return the maximum allowable exponent for a FloatD that is finite.

emin
     Return the maximum allowable exponent for a FloatD that is finite.

fmax
     Return the largest normalized FloatD that is not infinite.

fminNormalized
     Return the smallest normalized FloatD that is > 0

infinity
     Return a FloatD that represents positive infinity.

nan
     Return a FloatD that represents a mathematically indeterminate
     value (e.g. Inf - Inf, Inf / Inf).

negativeInfinity
     Return a FloatD that represents negative infinity.

precision
     Answer the number of bits in the mantissa. 1 + (2^-precision) = 1



File: gst-base.info,  Node: FloatD class-converting,  Next: FloatD-built ins,  Prev: FloatD class-characterization,  Up: FloatD

1.76.3 FloatD class: converting
-------------------------------

coerce: aNumber
     Answer aNumber converted to a FloatD



File: gst-base.info,  Node: FloatD-built ins,  Next: FloatD-coercing,  Prev: FloatD class-converting,  Up: FloatD

1.76.4 FloatD: built ins
------------------------

* arg
     Multiply the receiver and arg and answer another Number

+ arg
     Sum the receiver and arg and answer another Number

- arg
     Subtract arg from the receiver and answer another Number

/ arg
     Divide the receiver by arg and answer another FloatD

< arg
     Answer whether the receiver is less than arg

<= arg
     Answer whether the receiver is less than or equal to arg

= arg
     Answer whether the receiver is equal to arg

> arg
     Answer whether the receiver is greater than arg

>= arg
     Answer whether the receiver is greater than or equal to arg

asFloatE
     Answer the receiver converted to a FloatE

asFloatQ
     Answer the receiver converted to a FloatQ

exponent
     Answer the exponent of the receiver in mantissa*2^exponent
     representation ( |mantissa|<=1 )

fractionPart
     Answer the fractional part of the receiver

timesTwoPower: arg
     Answer the receiver multiplied by 2^arg

truncated
     Truncate the receiver towards zero and answer the result

~= arg
     Answer whether the receiver is not equal to arg



File: gst-base.info,  Node: FloatD-coercing,  Prev: FloatD-built ins,  Up: FloatD

1.76.5 FloatD: coercing
-----------------------

asFloatD
     Just defined for completeness.  Return the receiver.

coerce: aNumber
     Coerce aNumber to the receiver's class

generality
     Answer the receiver's generality

unity
     Coerce 1 to the receiver's class

zero
     Coerce 0 to the receiver's class



File: gst-base.info,  Node: FloatE,  Next: FloatQ,  Prev: FloatD,  Up: Base classes

1.77 FloatE
===========

Defined in namespace Smalltalk
Superclass: Float
Category: Language-Data types
     My instances represent floating point numbers that have 64 bits of
     precision (well, less than that in precision; they are precisely
     the same as C's "double" datatype).  Besides the standard
     numerical operations, I provide transcendental operations too.

* Menu:

* FloatE class-byte-order dependancies::  (class)
* FloatE class-characterization::  (class)
* FloatE class-converting::  (class)
* FloatE-built ins::  (instance)
* FloatE-coercing::  (instance)


File: gst-base.info,  Node: FloatE class-byte-order dependancies,  Next: FloatE class-characterization,  Up: FloatE

1.77.1 FloatE class: byte-order dependancies
--------------------------------------------

signByte
     Answer the byte of the receiver that contains the sign bit



File: gst-base.info,  Node: FloatE class-characterization,  Next: FloatE class-converting,  Prev: FloatE class-byte-order dependancies,  Up: FloatE

1.77.2 FloatE class: characterization
-------------------------------------

decimalDigits
     Return the number of decimal digits of precision for a FloatE.
     Technically, if P is the precision for the representation, then
     the decimal precision Q is the maximum number of decimal digits
     such that any floating point number with Q base 10 digits can be
     rounded to a floating point number with P base 2 digits and back
     again, without change to the Q decimal digits.

e
     Returns the value of e. Hope is that it is precise enough

emax
     Return the maximum allowable exponent for a FloatE that is finite.

emin
     Return the maximum allowable exponent for a FloatE that is finite.

fmax
     Return the largest normalized FloatE that is not infinite.

fminNormalized
     Return the smallest normalized FloatE that is > 0

infinity
     Return a FloatE that represents positive infinity.

ln10
     Returns the value of ln 10. Hope is that it is precise enough

log10Base2
     Returns the value of log2 10. Hope is that it is precise enough

nan
     Return a FloatE that represents a mathematically indeterminate
     value (e.g. Inf - Inf, Inf / Inf).

negativeInfinity
     Return a FloatE that represents negative infinity.

pi
     Returns the value of pi. Hope is that it is precise enough

precision
     Answer the number of bits in the mantissa. 1 + (2^-precision) = 1



File: gst-base.info,  Node: FloatE class-converting,  Next: FloatE-built ins,  Prev: FloatE class-characterization,  Up: FloatE

1.77.3 FloatE class: converting
-------------------------------

coerce: aNumber
     Answer aNumber converted to a FloatE



File: gst-base.info,  Node: FloatE-built ins,  Next: FloatE-coercing,  Prev: FloatE class-converting,  Up: FloatE

1.77.4 FloatE: built ins
------------------------

* arg
     Multiply the receiver and arg and answer another Number

+ arg
     Sum the receiver and arg and answer another Number

- arg
     Subtract arg from the receiver and answer another Number

/ arg
     Divide the receiver by arg and answer another FloatE

< arg
     Answer whether the receiver is less than arg

<= arg
     Answer whether the receiver is less than or equal to arg

= arg
     Answer whether the receiver is equal to arg

> arg
     Answer whether the receiver is greater than arg

>= arg
     Answer whether the receiver is greater than or equal to arg

asFloatD
     Answer the receiver converted to a FloatD

asFloatQ
     Answer the receiver converted to a FloatQ

exponent
     Answer the exponent of the receiver in mantissa*2^exponent
     representation ( |mantissa|<=1 )

fractionPart
     Answer the fractional part of the receiver

timesTwoPower: arg
     Answer the receiver multiplied by 2^arg

truncated
     Truncate the receiver towards zero and answer the result

~= arg
     Answer whether the receiver is not equal to arg



File: gst-base.info,  Node: FloatE-coercing,  Prev: FloatE-built ins,  Up: FloatE

1.77.5 FloatE: coercing
-----------------------

asFloatE
     Just defined for completeness.  Return the receiver.

coerce: aNumber
     Coerce aNumber to the receiver's class

generality
     Answer the receiver's generality

unity
     Coerce 1 to the receiver's class

zero
     Coerce 0 to the receiver's class



File: gst-base.info,  Node: FloatQ,  Next: Fraction,  Prev: FloatE,  Up: Base classes

1.78 FloatQ
===========

Defined in namespace Smalltalk
Superclass: Float
Category: Language-Data types
     My instances represent floating point numbers that have 64 bits of
     precision (well, less than that in precision; they are precisely
     the same as C's "double" datatype).  Besides the standard
     numerical operations, I provide transcendental operations too.

* Menu:

* FloatQ class-byte-order dependancies::  (class)
* FloatQ class-characterization::  (class)
* FloatQ class-converting::  (class)
* FloatQ-built ins::  (instance)
* FloatQ-coercing::  (instance)


File: gst-base.info,  Node: FloatQ class-byte-order dependancies,  Next: FloatQ class-characterization,  Up: FloatQ

1.78.1 FloatQ class: byte-order dependancies
--------------------------------------------

signByte
     Answer the byte of the receiver that contains the sign bit



File: gst-base.info,  Node: FloatQ class-characterization,  Next: FloatQ class-converting,  Prev: FloatQ class-byte-order dependancies,  Up: FloatQ

1.78.2 FloatQ class: characterization
-------------------------------------

decimalDigits
     Return the number of decimal digits of precision for a FloatQ.
     Technically, if P is the precision for the representation, then
     the decimal precision Q is the maximum number of decimal digits
     such that any floating point number with Q base 10 digits can be
     rounded to a floating point number with P base 2 digits and back
     again, without change to the Q decimal digits.

e
     Returns the value of e. Hope is that it is precise enough

emax
     Return the maximum allowable exponent for a FloatQ that is finite.

emin
     Return the maximum allowable exponent for a FloatQ that is finite.

fmax
     Return the largest normalized FloatQ that is not infinite.

fminNormalized
     Return the smallest normalized FloatQ that is > 0

infinity
     Return a FloatQ that represents positive infinity.

ln10
     Returns the value of ln 10. Hope is that it is precise enough

log10Base2
     Returns the value of log2 10. Hope is that it is precise enough

nan
     Return a FloatQ that represents a mathematically indeterminate
     value (e.g. Inf - Inf, Inf / Inf).

negativeInfinity
     Return a FloatQ that represents negative infinity.

pi
     Returns the value of pi. Hope is that it is precise enough

precision
     Answer the number of bits in the mantissa. 1 + (2^-precision) = 1



File: gst-base.info,  Node: FloatQ class-converting,  Next: FloatQ-built ins,  Prev: FloatQ class-characterization,  Up: FloatQ

1.78.3 FloatQ class: converting
-------------------------------

coerce: aNumber
     Answer aNumber converted to a FloatQ



File: gst-base.info,  Node: FloatQ-built ins,  Next: FloatQ-coercing,  Prev: FloatQ class-converting,  Up: FloatQ

1.78.4 FloatQ: built ins
------------------------

* arg
     Multiply the receiver and arg and answer another Number

+ arg
     Sum the receiver and arg and answer another Number

- arg
     Subtract arg from the receiver and answer another Number

/ arg
     Divide the receiver by arg and answer another FloatQ

< arg
     Answer whether the receiver is less than arg

<= arg
     Answer whether the receiver is less than or equal to arg

= arg
     Answer whether the receiver is equal to arg

> arg
     Answer whether the receiver is greater than arg

>= arg
     Answer whether the receiver is greater than or equal to arg

asFloatD
     Answer the receiver converted to a FloatD

asFloatE
     Answer the receiver converted to a FloatE

exponent
     Answer the exponent of the receiver in mantissa*2^exponent
     representation ( |mantissa|<=1 )

fractionPart
     Answer the fractional part of the receiver

timesTwoPower: arg
     Answer the receiver multiplied by 2^arg

truncated
     Truncate the receiver towards zero and answer the result

~= arg
     Answer whether the receiver is not equal to arg



File: gst-base.info,  Node: FloatQ-coercing,  Prev: FloatQ-built ins,  Up: FloatQ

1.78.5 FloatQ: coercing
-----------------------

asFloatQ
     Just defined for completeness.  Return the receiver.

coerce: aNumber
     Coerce aNumber to the receiver's class

generality
     Answer the receiver's generality

unity
     Coerce 1 to the receiver's class

zero
     Coerce 0 to the receiver's class



File: gst-base.info,  Node: Fraction,  Next: Halt,  Prev: FloatQ,  Up: Base classes

1.79 Fraction
=============

Defined in namespace Smalltalk
Superclass: Number
Category: Language-Data types
     I represent rational numbers in the form (p/q) where p and q are
     integers.  The arithmetic operations  *, +, -, /,  on fractions,
     all return a reduced fraction.

* Menu:

* Fraction class-converting::  (class)
* Fraction class-instance creation::  (class)
* Fraction-accessing::  (instance)
* Fraction-arithmetic::  (instance)
* Fraction-coercing::  (instance)
* Fraction-comparing::  (instance)
* Fraction-converting::  (instance)
* Fraction-optimized cases::  (instance)
* Fraction-printing::  (instance)
* Fraction-testing::  (instance)


File: gst-base.info,  Node: Fraction class-converting,  Next: Fraction class-instance creation,  Up: Fraction

1.79.1 Fraction class: converting
---------------------------------

coerce: aNumber
     Answer aNumber converted to a Fraction



File: gst-base.info,  Node: Fraction class-instance creation,  Next: Fraction-accessing,  Prev: Fraction class-converting,  Up: Fraction

1.79.2 Fraction class: instance creation
----------------------------------------

initialize
     Initialize the receiver's class variables

numerator: nInteger denominator: dInteger
     Answer a new instance of fraction (nInteger/dInteger)



File: gst-base.info,  Node: Fraction-accessing,  Next: Fraction-arithmetic,  Prev: Fraction class-instance creation,  Up: Fraction

1.79.3 Fraction: accessing
--------------------------

denominator
     Answer the receiver's denominator

numerator
     Answer the receiver's numerator



File: gst-base.info,  Node: Fraction-arithmetic,  Next: Fraction-coercing,  Prev: Fraction-accessing,  Up: Fraction

1.79.4 Fraction: arithmetic
---------------------------

* aNumber
     Multiply two numbers and answer the result.

+ aNumber
     Sum two numbers and answer the result.

- aNumber
     Subtract aNumber from the receiver and answer the result.

/ aNumber
     Divide the receiver by aNumber and answer the result.

// aNumber
     Return the integer quotient of dividing the receiver by aNumber
     with truncation towards negative infinity.

\\ aNumber
     Return the remainder from dividing the receiver by aNumber, (using
     //).

estimatedLog
     Answer an estimate of (self abs floorLog: 10)



File: gst-base.info,  Node: Fraction-coercing,  Next: Fraction-comparing,  Prev: Fraction-arithmetic,  Up: Fraction

1.79.5 Fraction: coercing
-------------------------

ceiling
     Truncate the receiver towards positive infinity and return the
     truncated result

coerce: aNumber
     Coerce aNumber to the receiver's class

floor
     Truncate the receiver towards negative infinity and return the
     truncated result

generality
     Return the receiver's generality

truncated
     Truncate the receiver and return the truncated result

unity
     Coerce 1 to the receiver's class

zero
     Coerce 0 to the receiver's class



File: gst-base.info,  Node: Fraction-comparing,  Next: Fraction-converting,  Prev: Fraction-coercing,  Up: Fraction

1.79.6 Fraction: comparing
--------------------------

< arg
     Test if the receiver is less than arg.

<= arg
     Test if the receiver is less than or equal to arg.

= arg
     Test if the receiver equals arg.

> arg
     Test if the receiver is more than arg.

>= arg
     Test if the receiver is greater than or equal to arg.

hash
     Answer an hash value for the receiver



File: gst-base.info,  Node: Fraction-converting,  Next: Fraction-optimized cases,  Prev: Fraction-comparing,  Up: Fraction

1.79.7 Fraction: converting
---------------------------

asFloatD
     Answer the receiver converted to a FloatD

asFloatE
     Answer the receiver converted to a FloatD

asFloatQ
     Answer the receiver converted to a FloatD

asFraction
     Answer the receiver, it is already a Fraction

integerPart
     Answer the integer part of the receiver, expressed as a Fraction



File: gst-base.info,  Node: Fraction-optimized cases,  Next: Fraction-printing,  Prev: Fraction-converting,  Up: Fraction

1.79.8 Fraction: optimized cases
--------------------------------

negated
     Return the receiver, with its sign changed.

raisedToInteger: anInteger
     Return self raised to the anInteger-th power.

reciprocal
     Return the reciprocal of the receiver

squared
     Return the square of the receiver.



File: gst-base.info,  Node: Fraction-printing,  Next: Fraction-testing,  Prev: Fraction-optimized cases,  Up: Fraction

1.79.9 Fraction: printing
-------------------------

printOn: aStream
     Print a representation of the receiver on aStream

storeOn: aStream
     Store Smalltalk code compiling to the receiver on aStream



File: gst-base.info,  Node: Fraction-testing,  Prev: Fraction-printing,  Up: Fraction

1.79.10 Fraction: testing
-------------------------

isRational
     Answer whether the receiver is rational - true



File: gst-base.info,  Node: Halt,  Next: HashedCollection,  Prev: Fraction,  Up: Base classes

1.80 Halt
=========

Defined in namespace Smalltalk
Superclass: Error
Category: Language-Exceptions
     Halt represents a resumable error, usually a bug.

* Menu:

* Halt-description::  (instance)


File: gst-base.info,  Node: Halt-description,  Up: Halt

1.80.1 Halt: description
------------------------

description
     Answer a textual description of the exception.

isResumable
     Answer true.  #halt exceptions are by default resumable.



File: gst-base.info,  Node: HashedCollection,  Next: HomedAssociation,  Prev: Halt,  Up: Base classes

1.81 HashedCollection
=====================

Defined in namespace Smalltalk
Superclass: Collection
Category: Collections-Unordered
     I am an hashed collection that can store objects uniquely and give
     fast responses on their presence in the collection.

* Menu:

* HashedCollection class-instance creation::  (class)
* HashedCollection-accessing::  (instance)
* HashedCollection-builtins::  (instance)
* HashedCollection-copying::  (instance)
* HashedCollection-enumerating the elements of a collection::  (instance)
* HashedCollection-rehashing::  (instance)
* HashedCollection-removing::  (instance)
* HashedCollection-saving and loading::  (instance)
* HashedCollection-storing::  (instance)
* HashedCollection-testing collections::  (instance)


File: gst-base.info,  Node: HashedCollection class-instance creation,  Next: HashedCollection-accessing,  Up: HashedCollection

1.81.1 HashedCollection class: instance creation
------------------------------------------------

new
     Answer a new instance of the receiver with a default size

new: anInteger
     Answer a new instance of the receiver with the given size

primNew: realSize
     Not commented.



File: gst-base.info,  Node: HashedCollection-accessing,  Next: HashedCollection-builtins,  Prev: HashedCollection class-instance creation,  Up: HashedCollection

1.81.2 HashedCollection: accessing
----------------------------------

add: newObject
     Add newObject to the set, if and only if the set doesn't already
     contain an occurrence of it. Don't fail if a duplicate is found.
     Answer anObject

at: index
     This method should not be called for instances of this class.

at: index put: value
     This method should not be called for instances of this class.



File: gst-base.info,  Node: HashedCollection-builtins,  Next: HashedCollection-copying,  Prev: HashedCollection-accessing,  Up: HashedCollection

1.81.3 HashedCollection: builtins
---------------------------------

primAt: anIndex
     Private - Answer the anIndex-th item of the hash table for the
     receiver.  Using this instead of basicAt: allows for easier
     changes in the representation

primAt: anIndex put: value
     Private - Store value in the anIndex-th item of the hash table for
     the receiver. Using this instead of basicAt:put: allows for easier
     changes in the representation

primSize
     Private - Answer the size of the hash table for the receiver.
     Using this instead of basicSize allows for easier changes in the
     representation



File: gst-base.info,  Node: HashedCollection-copying,  Next: HashedCollection-enumerating the elements of a collection,  Prev: HashedCollection-builtins,  Up: HashedCollection

1.81.4 HashedCollection: copying
--------------------------------

deepCopy
     Returns a deep copy of the receiver (the instance variables are
     copies of the receiver's instance variables)

shallowCopy
     Returns a shallow copy of the receiver (the instance variables are
     not copied)



File: gst-base.info,  Node: HashedCollection-enumerating the elements of a collection,  Next: HashedCollection-rehashing,  Prev: HashedCollection-copying,  Up: HashedCollection

1.81.5 HashedCollection: enumerating the elements of a collection
-----------------------------------------------------------------

do: aBlock
     Enumerate all the non-nil members of the set



File: gst-base.info,  Node: HashedCollection-rehashing,  Next: HashedCollection-removing,  Prev: HashedCollection-enumerating the elements of a collection,  Up: HashedCollection

1.81.6 HashedCollection: rehashing
----------------------------------

rehash
     Rehash the receiver



File: gst-base.info,  Node: HashedCollection-removing,  Next: HashedCollection-saving and loading,  Prev: HashedCollection-rehashing,  Up: HashedCollection

1.81.7 HashedCollection: removing
---------------------------------

remove: oldObject ifAbsent: anExceptionBlock
     Remove oldObject to the set. If it is found, answer oldObject.
     Otherwise, evaluate anExceptionBlock and return its value.



File: gst-base.info,  Node: HashedCollection-saving and loading,  Next: HashedCollection-storing,  Prev: HashedCollection-removing,  Up: HashedCollection

1.81.8 HashedCollection: saving and loading
-------------------------------------------

postLoad
     Called after loading an object; rehash the collection because
     identity objects will most likely mutate their hashes.

postStore
     Called after an object is dumped.  Do nothing - necessary because
     by default this calls #postLoad by default



File: gst-base.info,  Node: HashedCollection-storing,  Next: HashedCollection-testing collections,  Prev: HashedCollection-saving and loading,  Up: HashedCollection

1.81.9 HashedCollection: storing
--------------------------------

storeOn: aStream
     Store on aStream some Smalltalk code which compiles to the receiver



File: gst-base.info,  Node: HashedCollection-testing collections,  Prev: HashedCollection-storing,  Up: HashedCollection

1.81.10 HashedCollection: testing collections
---------------------------------------------

= aHashedCollection
     Returns true if the two sets have the same membership, false if not

capacity
     Answer how many elements the receiver can hold before having to
     grow.

hash
     Return the hash code for the members of the set.  Since order is
     unimportant, we use a commutative operator to compute the hash
     value.

includes: anObject
     Answer whether the receiver contains an instance of anObject.

isEmpty
     Answer whether the receiver is empty.

occurrencesOf: anObject
     Return the number of occurrences of anObject.  Since we're a set,
     this is either 0 or 1.  Nil is never directly in the set, so we
     special case it (the result is always 1).

size
     Answer the receiver's size



File: gst-base.info,  Node: HomedAssociation,  Next: IdentityDictionary,  Prev: HashedCollection,  Up: Base classes

1.82 HomedAssociation
=====================

Defined in namespace Smalltalk
Superclass: Association
Category: Language-Data types
     My instances represent know about their parent namespace, which is
     of use when implementing weak collections and finalizations.

* Menu:

* HomedAssociation class-basic::  (class)
* HomedAssociation-accessing::  (instance)
* HomedAssociation-finalization::  (instance)
* HomedAssociation-storing::  (instance)


File: gst-base.info,  Node: HomedAssociation class-basic,  Next: HomedAssociation-accessing,  Up: HomedAssociation

1.82.1 HomedAssociation class: basic
------------------------------------

key: aKey value: aValue environment: aNamespace
     Answer a new association with the given key and value



File: gst-base.info,  Node: HomedAssociation-accessing,  Next: HomedAssociation-finalization,  Prev: HomedAssociation class-basic,  Up: HomedAssociation

1.82.2 HomedAssociation: accessing
----------------------------------

environment
     Answer the namespace in which I live.

environment: aNamespace
     Set the namespace in which I live to be aNamespace.



File: gst-base.info,  Node: HomedAssociation-finalization,  Next: HomedAssociation-storing,  Prev: HomedAssociation-accessing,  Up: HomedAssociation

1.82.3 HomedAssociation: finalization
-------------------------------------

mourn
     This message is sent to the receiver when the object is made
     ephemeron (which is common when HomedAssociations are used by a
     WeakKeyDictionary or a WeakSet).  The mourning of the object's key
     is first of all demanded to the environment (which will likely
     remove the object from itself), and then performed as usual by
     clearing the key and value fields.



File: gst-base.info,  Node: HomedAssociation-storing,  Prev: HomedAssociation-finalization,  Up: HomedAssociation

1.82.4 HomedAssociation: storing
--------------------------------

storeOn: aStream
     Put on aStream some Smalltalk code compiling to the receiver



File: gst-base.info,  Node: IdentityDictionary,  Next: IdentitySet,  Prev: HomedAssociation,  Up: Base classes

1.83 IdentityDictionary
=======================

Defined in namespace Smalltalk
Superclass: LookupTable
Category: Collections-Keyed
     I am similar to LookupTable, except that I use the object identity
     comparision message == to determine equivalence of indices.

* Menu:


File: gst-base.info,  Node: IdentitySet,  Next: Integer,  Prev: IdentityDictionary,  Up: Base classes

1.84 IdentitySet
================

Defined in namespace Smalltalk
Superclass: Set
Category: Collections-Unordered
     I am the typical set object; I can store any objects uniquely.  I
     use the == operator to determine duplication of objects.

* Menu:

* IdentitySet-testing::  (instance)


File: gst-base.info,  Node: IdentitySet-testing,  Up: IdentitySet

1.84.1 IdentitySet: testing
---------------------------

identityIncludes: anObject
     Answer whether we include the anObject object; for IdentitySets
     this is identical to #includes:



File: gst-base.info,  Node: Integer,  Next: Interval,  Prev: IdentitySet,  Up: Base classes

1.85 Integer
============

Defined in namespace Smalltalk
Superclass: Number
Category: Language-Data types
     I am the abstract integer class of the GNU Smalltalk system.  My
     subclasses' instances can represent signed integers of various
     sizes (a subclass is picked according to the size), with varying
     efficiency.

* Menu:

* Integer class-converting::  (class)
* Integer-accessing::  (instance)
* Integer-basic::  (instance)
* Integer-bit operators::  (instance)
* Integer-converting::  (instance)
* Integer-extension::  (instance)
* Integer-iterators::  (instance)
* Integer-math methods::  (instance)
* Integer-printing::  (instance)
* Integer-storing::  (instance)
* Integer-testing functionality::  (instance)


File: gst-base.info,  Node: Integer class-converting,  Next: Integer-accessing,  Up: Integer

1.85.1 Integer class: converting
--------------------------------

coerce: aNumber
     Answer aNumber converted to a kind of Integer

readFrom: aStream radix: radix
     Read a possibly negative number in the given radix from aStream,
     and answer its value.



File: gst-base.info,  Node: Integer-accessing,  Next: Integer-basic,  Prev: Integer class-converting,  Up: Integer

1.85.2 Integer: accessing
-------------------------

denominator
     Answer `1'.

numerator
     Answer the receiver.



File: gst-base.info,  Node: Integer-basic,  Next: Integer-bit operators,  Prev: Integer-accessing,  Up: Integer

1.85.3 Integer: basic
---------------------

hash
     Answer an hash value for the receiver



File: gst-base.info,  Node: Integer-bit operators,  Next: Integer-converting,  Prev: Integer-basic,  Up: Integer

1.85.4 Integer: bit operators
-----------------------------

allMask: anInteger
     True if all 1 bits in anInteger are 1 in the receiver

anyMask: anInteger
     True if any 1 bits in anInteger are 1 in the receiver

bitAt: index
     Answer the index-th bit of the receiver (the LSB has an index of 1)

bitAt: index put: value
     Answer an integer which is identical to the receiver, possibly
     with the exception of the index-th bit of the receiver (the LSB
     having an index of 1), which assumes a value equal to the
     low-order bit of the second parameter.

bitClear: aMask
     Answer an Integer equal to the receiver, except that all the bits
     that are set in aMask are cleared.

bitInvert
     Return the 1's complement of the bits of the receiver

clearBit: index
     Clear the index-th bit of the receiver and answer a new Integer

highBit
     Return the index of the highest order 1 bit of the receiver

isBitSet: index
     Answer whether the index-th bit of the receiver is set

noMask: anInteger
     True if no 1 bits in anInteger are 1 in the receiver

setBit: index
     Set the index-th bit of the receiver and answer a new Integer



File: gst-base.info,  Node: Integer-converting,  Next: Integer-extension,  Prev: Integer-bit operators,  Up: Integer

1.85.5 Integer: converting
--------------------------

asCharacter
     Return self as an ascii character

asFraction
     Return the receiver converted to a fraction

asScaledDecimal: n
     Answer the receiver, converted to a ScaledDecimal object.  The
     scale is forced to be 0.

ceiling
     Return the receiver - it's already truncated

coerce: aNumber
     Coerce aNumber to the receiver's class

floor
     Return the receiver - it's already truncated

rounded
     Return the receiver - it's already truncated

truncated
     Return the receiver - it's already truncated



File: gst-base.info,  Node: Integer-extension,  Next: Integer-iterators,  Prev: Integer-converting,  Up: Integer

1.85.6 Integer: extension
-------------------------

alignTo: anInteger
     Answer the receiver, truncated to the first higher or equal
     multiple of anInteger (which must be a power of two)



File: gst-base.info,  Node: Integer-iterators,  Next: Integer-math methods,  Prev: Integer-extension,  Up: Integer

1.85.7 Integer: iterators
-------------------------

timesRepeat: aBlock
     Evaluate aBlock a number of times equal to the receiver's value.
     Compiled in-line for no argument aBlocks without temporaries, and
     therefore not overridable.



File: gst-base.info,  Node: Integer-math methods,  Next: Integer-printing,  Prev: Integer-iterators,  Up: Integer

1.85.8 Integer: math methods
----------------------------

binomial: anInteger
     Compute the number of combinations of anInteger objects among a
     number of objects given by the receiver.

estimatedLog
     Answer an estimate of (self abs floorLog: 10)

even
     Return whether the receiver is even

factorial
     Return the receiver's factorial.

floorLog: radix
     return (self log: radix) floor. Optimized to answer an integer.

gcd: anInteger
     Return the greatest common divisor (Euclid's algorithm) between the
     receiver and anInteger

lcm: anInteger
     Return the least common multiple between the receiver and anInteger

odd
     Return whether the receiver is odd



File: gst-base.info,  Node: Integer-printing,  Next: Integer-storing,  Prev: Integer-math methods,  Up: Integer

1.85.9 Integer: printing
------------------------

displayOn: aStream
     Print on aStream the base 10 representation of the receiver

displayString
     Return the base 10 representation of the receiver

printOn: aStream
     Print on aStream the base 10 representation of the receiver

printOn: aStream base: b
     Print on aStream the base b representation of the receiver

printString
     Return the base 10 representation of the receiver

printString: baseInteger
     Return the base b representation of the receiver

printStringRadix: baseInteger
     Return the base b representation of the receiver, with BBr in
     front of it

     instead

radix: baseInteger
     Return the base b representation of the receiver, with BBr in
     front of it.  This method is deprecated, use #printStringRadix:
     instead.

storeOn: aStream base: b
     Print on aStream Smalltalk code compiling to the receiver,
     represented in base b



File: gst-base.info,  Node: Integer-storing,  Next: Integer-testing functionality,  Prev: Integer-printing,  Up: Integer

1.85.10 Integer: storing
------------------------

storeOn: aStream
     Print on aStream the base 10 representation of the receiver

storeString
     Return the base 10 representation of the receiver



File: gst-base.info,  Node: Integer-testing functionality,  Prev: Integer-storing,  Up: Integer

1.85.11 Integer: testing functionality
--------------------------------------

isInteger
     Answer `true'.

isRational
     Answer whether the receiver is rational - true



File: gst-base.info,  Node: Interval,  Next: LargeArray,  Prev: Integer,  Up: Base classes

1.86 Interval
=============

Defined in namespace Smalltalk
Superclass: ArrayedCollection
Category: Collections-Sequenceable
     My instances represent ranges of objects, typically Number type
     objects.  I provide iteration/enumeration messages for producing
     all the members that my instance represents.

* Menu:

* Interval class-instance creation::  (class)
* Interval-basic::  (instance)
* Interval-printing::  (instance)
* Interval-storing::  (instance)
* Interval-testing::  (instance)


File: gst-base.info,  Node: Interval class-instance creation,  Next: Interval-basic,  Up: Interval

1.86.1 Interval class: instance creation
----------------------------------------

from: startInteger to: stopInteger
     Answer an Interval going from startInteger to the stopInteger,
     with a step of 1

from: startInteger to: stopInteger by: stepInteger
     Answer an Interval going from startInteger to the stopInteger,
     with a step of stepInteger

withAll: aCollection
     Answer an Interval containing the same elements as aCollection.
     Fail if it is not possible to create one.



File: gst-base.info,  Node: Interval-basic,  Next: Interval-printing,  Prev: Interval class-instance creation,  Up: Interval

1.86.2 Interval: basic
----------------------

at: index
     Answer the index-th element of the receiver.

at: index put: anObject
     This method should not be called for instances of this class.

collect: aBlock
     Evaluate the receiver for each element in aBlock, collect in an
     array the result of the evaluations.

"Note to
     Not commented.

reverse
     Answer a copy of the receiver with all of its items reversed

size
     Answer the number of elements in the receiver.

species
     Answer `Array'.



File: gst-base.info,  Node: Interval-printing,  Next: Interval-storing,  Prev: Interval-basic,  Up: Interval

1.86.3 Interval: printing
-------------------------

first
     Answer `start'.

increment
     Answer `step'.

last
     Not commented.

printOn: aStream
     Print a representation for the receiver on aStream



File: gst-base.info,  Node: Interval-storing,  Next: Interval-testing,  Prev: Interval-printing,  Up: Interval

1.86.4 Interval: storing
------------------------

storeOn: aStream
     Store Smalltalk code compiling to the receiver on aStream



File: gst-base.info,  Node: Interval-testing,  Prev: Interval-storing,  Up: Interval

1.86.5 Interval: testing
------------------------

= anInterval
     Answer whether anInterval is the same interval as the receiver

hash
     Answer an hash value for the receiver



File: gst-base.info,  Node: LargeArray,  Next: LargeArrayedCollection,  Prev: Interval,  Up: Base classes

1.87 LargeArray
===============

Defined in namespace Smalltalk
Superclass: LargeArrayedCollection
Category: Collections-Sequenceable
     I am similar to a plain array, but I'm specially designed to save
     memory when lots of items are nil.

* Menu:

* LargeArray-overridden::  (instance)


File: gst-base.info,  Node: LargeArray-overridden,  Up: LargeArray

1.87.1 LargeArray: overridden
-----------------------------

newCollection: size
     Create an Array of the given size



File: gst-base.info,  Node: LargeArrayedCollection,  Next: LargeArraySubpart,  Prev: LargeArray,  Up: Base classes

1.88 LargeArrayedCollection
===========================

Defined in namespace Smalltalk
Superclass: ArrayedCollection
Category: Collections-Sequenceable
     I am an abstract class specially designed to save memory when lots
     of items have the same value.

* Menu:

* LargeArrayedCollection class-instance creation::  (class)
* LargeArrayedCollection-accessing::  (instance)
* LargeArrayedCollection-basic::  (instance)


File: gst-base.info,  Node: LargeArrayedCollection class-instance creation,  Next: LargeArrayedCollection-accessing,  Up: LargeArrayedCollection

1.88.1 LargeArrayedCollection class: instance creation
------------------------------------------------------

new: anInteger
     Answer a new instance of the receiver, with room for anInteger
     elements.



File: gst-base.info,  Node: LargeArrayedCollection-accessing,  Next: LargeArrayedCollection-basic,  Prev: LargeArrayedCollection class-instance creation,  Up: LargeArrayedCollection

1.88.2 LargeArrayedCollection: accessing
----------------------------------------

at: anIndex
     Answer the anIndex-th item of the receiver.

at: anIndex put: anObject
     Replace the anIndex-th item of the receiver with anObject.

compress
     Arrange the representation of the array for maximum memory saving.



File: gst-base.info,  Node: LargeArrayedCollection-basic,  Prev: LargeArrayedCollection-accessing,  Up: LargeArrayedCollection

1.88.3 LargeArrayedCollection: basic
------------------------------------

= aLargeArray
     Answer whether the receiver and aLargeArray have the same contents

hash
     Answer an hash value for the receiver

size
     Answer the maximum valid index for the receiver



File: gst-base.info,  Node: LargeArraySubpart,  Next: LargeByteArray,  Prev: LargeArrayedCollection,  Up: Base classes

1.89 LargeArraySubpart
======================

Defined in namespace Smalltalk
Superclass: Magnitude
Category: Collections-Sequenceable
     This class is an auxiliary class used to store information about a
     LargeArrayedCollection's contents.  LargeArrayedCollections store
     their items non-contiguously in a separate storage object, and use
     a SortedCollection to map between indices in the array and indices
     in the storage object; instances of this class represent a block of
     indices that is stored contiguously in the storage object.

* Menu:

* LargeArraySubpart class-instance creation::  (class)
* LargeArraySubpart-accessing::  (instance)
* LargeArraySubpart-comparing::  (instance)
* LargeArraySubpart-modifying::  (instance)


File: gst-base.info,  Node: LargeArraySubpart class-instance creation,  Next: LargeArraySubpart-accessing,  Up: LargeArraySubpart

1.89.1 LargeArraySubpart class: instance creation
-------------------------------------------------

first: first last: last index: index
     Answer a LargeArraySubpart which answers first, last, and index
     when it is sent (respectively) #first, #last and #firstIndex.



File: gst-base.info,  Node: LargeArraySubpart-accessing,  Next: LargeArraySubpart-comparing,  Prev: LargeArraySubpart class-instance creation,  Up: LargeArraySubpart

1.89.2 LargeArraySubpart: accessing
-----------------------------------

first
     Answer the index of the first item of the LargeArrayedCollection
     that the receiver refers to.

first: firstIndex last: lastIndex index: storagePosition
     Set up the receiver so that it answers first, last, and index when
     it is sent (respectively) #first, #last and #firstIndex.

firstIndex
     Answer the index in the collection's storage object of the first
     item of the LargeArrayedCollection that the receiver refers to.

last
     Answer the index of the last item of the LargeArrayedCollection
     that the receiver refers to.

lastIndex
     Answer the index in the collection's storage object of the last
     item of the LargeArrayedCollection that the receiver refers to.



File: gst-base.info,  Node: LargeArraySubpart-comparing,  Next: LargeArraySubpart-modifying,  Prev: LargeArraySubpart-accessing,  Up: LargeArraySubpart

1.89.3 LargeArraySubpart: comparing
-----------------------------------

< anObject
     Answer whether the receiver points to a part of the array that is
     before anObject (this makes sense only if the receiver and
     anObject are two LargeArraySubparts referring to the same
     LargeArrayedCollection).

<= anObject
     Answer whether the receiver points to a part of the array that is
     before anObject or starts at the same point (this makes sense only
     if the receiver and anObject are two LargeArraySubparts referring
     to the same LargeArrayedCollection).

= anObject
     Answer whether the receiver and anObject are equal (assuming that
     the receiver and anObject are two LargeArraySubparts referring to
     the same LargeArrayedCollection, which the receiver cannot check
     for).

hash
     Answer an hash value for the receiver



File: gst-base.info,  Node: LargeArraySubpart-modifying,  Prev: LargeArraySubpart-comparing,  Up: LargeArraySubpart

1.89.4 LargeArraySubpart: modifying
-----------------------------------

cutAt: position
     Answer a new LargeArraySubpart whose lastIndex is position - 1,
     and apply a #removeFirst: to the receiver so that the firstIndex
     becomes position

grow
     Add one to last and lastIndex

growBy: numberOfElements
     Add numberOfElements to last and lastIndex

relocateTo: position
     Move the firstIndex to position, and the lastIndex accordingly.

removeFirst: n
     Sum n to first and firstIndex, but leave last/lastIndex untouched

removeLast: n
     Subtract n from last and lastIndex, but leave first/firstIndex
     untouched



File: gst-base.info,  Node: LargeByteArray,  Next: LargeInteger,  Prev: LargeArraySubpart,  Up: Base classes

1.90 LargeByteArray
===================

Defined in namespace Smalltalk
Superclass: LargeArrayedCollection
Category: Collections-Sequenceable
     I am similar to a plain ByteArray, but I'm specially designed to
     save memory when lots of items are zero.

* Menu:

* LargeByteArray-overridden::  (instance)


File: gst-base.info,  Node: LargeByteArray-overridden,  Up: LargeByteArray

1.90.1 LargeByteArray: overridden
---------------------------------

costOfNewIndex
     Answer the maximum number of consecutive items set to the
     defaultElement that can be present in a compressed array.

defaultElement
     Answer the value which is hoped to be the most common in the array

newCollection: size
     Create a ByteArray of the given size



File: gst-base.info,  Node: LargeInteger,  Next: LargeNegativeInteger,  Prev: LargeByteArray,  Up: Base classes

1.91 LargeInteger
=================

Defined in namespace Smalltalk
Superclass: Integer
Category: Language-Data types
     I represent a large integer, which has to be stored as a long
     sequence of bytes. I have methods to do arithmetics and
     comparisons, but I need some help from my children,
     LargePositiveInteger and LargeNegativeInteger, to speed them up a
     bit.

* Menu:

* LargeInteger-accessing::  (instance)
* LargeInteger-arithmetic::  (instance)
* LargeInteger-bit operations::  (instance)
* LargeInteger-built-ins::  (instance)
* LargeInteger-coercion::  (instance)
* LargeInteger-disabled::  (instance)
* LargeInteger-primitive operations::  (instance)
* LargeInteger-testing::  (instance)


File: gst-base.info,  Node: LargeInteger-accessing,  Next: LargeInteger-arithmetic,  Up: LargeInteger

1.91.1 LargeInteger: accessing
------------------------------

raisedToInteger: n
     Return self raised to the anInteger-th power



File: gst-base.info,  Node: LargeInteger-arithmetic,  Next: LargeInteger-bit operations,  Prev: LargeInteger-accessing,  Up: LargeInteger

1.91.2 LargeInteger: arithmetic
-------------------------------

* aNumber
     Multiply aNumber and the receiver, answer the result

+ aNumber
     Sum the receiver and aNumber, answer the result

- aNumber
     Sum the receiver and aNumber, answer the result

/ aNumber
     Divide aNumber and the receiver, answer the result (an Integer or
     Fraction)

// aNumber
     Divide aNumber and the receiver, answer the result truncated
     towards -infinity

\\ aNumber
     Divide aNumber and the receiver, answer the remainder truncated
     towards -infinity

estimatedLog
     Answer an estimate of (self abs floorLog: 10)

negated
     Answer the receiver's negated

quo: aNumber
     Divide aNumber and the receiver, answer the result truncated
     towards 0

rem: aNumber
     Divide aNumber and the receiver, answer the remainder truncated
     towards 0



File: gst-base.info,  Node: LargeInteger-bit operations,  Next: LargeInteger-built-ins,  Prev: LargeInteger-arithmetic,  Up: LargeInteger

1.91.3 LargeInteger: bit operations
-----------------------------------

bitAnd: aNumber
     Answer the receiver ANDed with aNumber

bitAt: aNumber
     Answer the aNumber-th bit in the receiver, where the LSB is 1

bitInvert
     Answer the receiver's 1's complement

bitOr: aNumber
     Answer the receiver ORed with aNumber

bitShift: aNumber
     Answer the receiver shifted by aNumber places

bitXor: aNumber
     Answer the receiver XORed with aNumber



File: gst-base.info,  Node: LargeInteger-built-ins,  Next: LargeInteger-coercion,  Prev: LargeInteger-bit operations,  Up: LargeInteger

1.91.4 LargeInteger: built-ins
------------------------------

at: anIndex
     Answer the anIndex-th byte in the receiver's representation

at: anIndex put: aNumber
     Set the anIndex-th byte in the receiver's representation

digitAt: anIndex
     Answer the anIndex-th base-256 digit in the receiver's
     representation

digitAt: anIndex put: aNumber
     Set the anIndex-th base-256 digit in the receiver's representation

digitLength
     Answer the number of base-256 digits in the receiver

hash
     Answer an hash value for the receiver

primReplaceFrom: start to: stop with: replacementString
     startingAt: replaceStart Private - Replace the characters from
     start to stop with new characters contained in replacementString
     (which, actually, can be any variable byte class), starting at the
     replaceStart location of replacementString

size
     Answer the number of indexed instance variable in the receiver



File: gst-base.info,  Node: LargeInteger-coercion,  Next: LargeInteger-disabled,  Prev: LargeInteger-built-ins,  Up: LargeInteger

1.91.5 LargeInteger: coercion
-----------------------------

coerce: aNumber
     Truncate the number; if needed, convert it to LargeInteger
     representation.

generality
     Answer the receiver's generality

unity
     Coerce 1 to the receiver's class

zero
     Coerce 0 to the receiver's class



File: gst-base.info,  Node: LargeInteger-disabled,  Next: LargeInteger-primitive operations,  Prev: LargeInteger-coercion,  Up: LargeInteger

1.91.6 LargeInteger: disabled
-----------------------------

asObject
     This method always fails. The number of OOPs is far less than the
     minimum number represented with a LargeInteger.

asObjectNoFail
     Answer `nil'.



File: gst-base.info,  Node: LargeInteger-primitive operations,  Next: LargeInteger-testing,  Prev: LargeInteger-disabled,  Up: LargeInteger

1.91.7 LargeInteger: primitive operations
-----------------------------------------

basicLeftShift: totalShift
     Private - Left shift the receiver by aNumber places

basicRightShift: totalShift
     Private - Right shift the receiver by 'shift' places

largeNegated
     Private - Same as negated, but always answer a LargeInteger



File: gst-base.info,  Node: LargeInteger-testing,  Prev: LargeInteger-primitive operations,  Up: LargeInteger

1.91.8 LargeInteger: testing
----------------------------

< aNumber
     Answer whether the receiver is smaller than aNumber

<= aNumber
     Answer whether the receiver is smaller than aNumber or equal to it

= aNumber
     Answer whether the receiver and aNumber identify the same number

> aNumber
     Answer whether the receiver is greater than aNumber

>= aNumber
     Answer whether the receiver is greater than aNumber or equal to it

~= aNumber
     Answer whether the receiver and aNumber identify the same number



File: gst-base.info,  Node: LargeNegativeInteger,  Next: LargePositiveInteger,  Prev: LargeInteger,  Up: Base classes

1.92 LargeNegativeInteger
=========================

Defined in namespace Smalltalk
Superclass: LargeInteger
Category: Language-Data types
     Just like my brother LargePositiveInteger, I provide a few methods
     that allow LargeInteger to determine the sign of a large integer
     in a fast way during its calculations. For example, I know that I
     am smaller than any LargePositiveInteger

* Menu:

* LargeNegativeInteger-converting::  (instance)
* LargeNegativeInteger-numeric testing::  (instance)
* LargeNegativeInteger-reverting to LargePositiveInteger::  (instance)


File: gst-base.info,  Node: LargeNegativeInteger-converting,  Next: LargeNegativeInteger-numeric testing,  Up: LargeNegativeInteger

1.92.1 LargeNegativeInteger: converting
---------------------------------------

asFloatD
     Answer the receiver converted to a FloatD

asFloatE
     Answer the receiver converted to a FloatE

asFloatQ
     Answer the receiver converted to a FloatQ



File: gst-base.info,  Node: LargeNegativeInteger-numeric testing,  Next: LargeNegativeInteger-reverting to LargePositiveInteger,  Prev: LargeNegativeInteger-converting,  Up: LargeNegativeInteger

1.92.2 LargeNegativeInteger: numeric testing
--------------------------------------------

abs
     Answer the receiver's absolute value.

negative
     Answer whether the receiver is < 0

positive
     Answer whether the receiver is >= 0

sign
     Answer the receiver's sign

strictlyPositive
     Answer whether the receiver is > 0



File: gst-base.info,  Node: LargeNegativeInteger-reverting to LargePositiveInteger,  Prev: LargeNegativeInteger-numeric testing,  Up: LargeNegativeInteger

1.92.3 LargeNegativeInteger: reverting to LargePositiveInteger
--------------------------------------------------------------

+ aNumber
     Sum the receiver and aNumber, answer the result

- aNumber
     Sum the receiver and aNumber, answer the result

gcd: anInteger
     Return the greatest common divisor between the receiver and
     anInteger

highBit
     Answer the receiver's highest bit's index



File: gst-base.info,  Node: LargePositiveInteger,  Next: LargeWordArray,  Prev: LargeNegativeInteger,  Up: Base classes

1.93 LargePositiveInteger
=========================

Defined in namespace Smalltalk
Superclass: LargeInteger
Category: Language-Data types
     Just like my brother LargeNegativeInteger, I provide a few methods
     that allow LargeInteger to determine the sign of a large integer
     in a fast way during its calculations.  For example, I know that I
     am larger than any LargeNegativeInteger.  In addition I implement
     the guts of arbitrary precision arithmetic.

* Menu:

* LargePositiveInteger-arithmetic::  (instance)
* LargePositiveInteger-converting::  (instance)
* LargePositiveInteger-helper byte-level methods::  (instance)
* LargePositiveInteger-numeric testing::  (instance)
* LargePositiveInteger-primitive operations::  (instance)


File: gst-base.info,  Node: LargePositiveInteger-arithmetic,  Next: LargePositiveInteger-converting,  Up: LargePositiveInteger

1.93.1 LargePositiveInteger: arithmetic
---------------------------------------

+ aNumber
     Sum the receiver and aNumber, answer the result

- aNumber
     Subtract aNumber from the receiver, answer the result

gcd: anInteger
     Calculate the GCD between the receiver and anInteger

highBit
     Answer the receiver's highest bit's index



File: gst-base.info,  Node: LargePositiveInteger-converting,  Next: LargePositiveInteger-helper byte-level methods,  Prev: LargePositiveInteger-arithmetic,  Up: LargePositiveInteger

1.93.2 LargePositiveInteger: converting
---------------------------------------

asFloatD
     Answer the receiver converted to a FloatD

asFloatE
     Answer the receiver converted to a FloatE

asFloatQ
     Answer the receiver converted to a FloatQ

replace: str withStringBase: radix
     Return in a String str the base radix representation of the
     receiver.



File: gst-base.info,  Node: LargePositiveInteger-helper byte-level methods,  Next: LargePositiveInteger-numeric testing,  Prev: LargePositiveInteger-converting,  Up: LargePositiveInteger

1.93.3 LargePositiveInteger: helper byte-level methods
------------------------------------------------------

bytes: byteArray1 from: j compare: byteArray2
     Private - Answer the sign of byteArray2 - byteArray1; the j-th
     byte of byteArray1 is compared with the first of byteArray2, the
     j+1-th with the second, and so on.

bytes: byteArray1 from: j subtract: byteArray2
     Private - Sutract the bytes in byteArray2 from those in byteArray1

bytes: bytes multiply: anInteger
     Private - Multiply the bytes in bytes by anInteger, which must be
     < 255.  Put the result back in bytes.

bytesLeftShift: aByteArray
     Private - Left shift by 1 place the bytes in aByteArray

bytesLeftShift: aByteArray big: totalShift
     Private - Left shift the bytes in aByteArray by totalShift places

bytesLeftShift: aByteArray n: shift
     Private - Left shift by shift places the bytes in aByteArray
     (shift <= 7)

bytesRightShift: aByteArray big: totalShift
     Private - Right shift the bytes in aByteArray by totalShift places

bytesRightShift: bytes n: aNumber
     Private - Right shift the bytes in `bytes' by 'aNumber' places
     (shift <= 7)

bytesTrailingZeros: bytes
     Private - Answer the number of trailing zero bits in the receiver

primDivide: rhs
     Private - Implements Knuth's divide and correct algorithm from
     `Seminumerical Algorithms' 3rd Edition, section 4.3.1 (which is
     basically an enhanced version of the divide `algorithm' for
     two-digit divisors which is taught in primary school!!!)



File: gst-base.info,  Node: LargePositiveInteger-numeric testing,  Next: LargePositiveInteger-primitive operations,  Prev: LargePositiveInteger-helper byte-level methods,  Up: LargePositiveInteger

1.93.4 LargePositiveInteger: numeric testing
--------------------------------------------

abs
     Answer the receiver's absolute value

negative
     Answer whether the receiver is < 0

positive
     Answer whether the receiver is >= 0

sign
     Answer the receiver's sign

strictlyPositive
     Answer whether the receiver is > 0



File: gst-base.info,  Node: LargePositiveInteger-primitive operations,  Prev: LargePositiveInteger-numeric testing,  Up: LargePositiveInteger

1.93.5 LargePositiveInteger: primitive operations
-------------------------------------------------

divide: aNumber using: aBlock
     Private - Divide the receiver by aNumber (unsigned division).
     Evaluate aBlock passing the result ByteArray, the remainder
     ByteArray, and whether the division had a remainder

isSmall
     Private - Answer whether the receiver is small enough to employ
     simple scalar algorithms for division and multiplication

multiply: aNumber
     Private - Multiply the receiver by aNumber (unsigned multiply)



File: gst-base.info,  Node: LargeWordArray,  Next: LargeZeroInteger,  Prev: LargePositiveInteger,  Up: Base classes

1.94 LargeWordArray
===================

Defined in namespace Smalltalk
Superclass: LargeArrayedCollection
Category: Collections-Sequenceable
     I am similar to a plain WordArray, but I'm specially designed to
     save memory when lots of items are zero.

* Menu:

* LargeWordArray-overridden::  (instance)


File: gst-base.info,  Node: LargeWordArray-overridden,  Up: LargeWordArray

1.94.1 LargeWordArray: overridden
---------------------------------

defaultElement
     Answer the value which is hoped to be the most common in the array

newCollection: size
     Create a WordArray of the given size



File: gst-base.info,  Node: LargeZeroInteger,  Next: Link,  Prev: LargeWordArray,  Up: Base classes

1.95 LargeZeroInteger
=====================

Defined in namespace Smalltalk
Superclass: LargePositiveInteger
Category: Language-Data types
     I am quite a strange class. Indeed, the concept of a "large
     integer" that is zero is a weird one. Actually my only instance is
     zero but is represented like LargeIntegers, has the same
     generality as LargeIntegers, and so on. That only instance is
     stored in the class variable Zero, and is used in arithmetical
     methods, when we have to coerce a parameter that is zero.

* Menu:

* LargeZeroInteger-accessing::  (instance)
* LargeZeroInteger-arithmetic::  (instance)
* LargeZeroInteger-numeric testing::  (instance)
* LargeZeroInteger-printing::  (instance)


File: gst-base.info,  Node: LargeZeroInteger-accessing,  Next: LargeZeroInteger-arithmetic,  Up: LargeZeroInteger

1.95.1 LargeZeroInteger: accessing
----------------------------------

at: anIndex
     Answer `0'.

hash
     Answer `0'.

size
     Answer `0'.



File: gst-base.info,  Node: LargeZeroInteger-arithmetic,  Next: LargeZeroInteger-numeric testing,  Prev: LargeZeroInteger-accessing,  Up: LargeZeroInteger

1.95.2 LargeZeroInteger: arithmetic
-----------------------------------

* aNumber
     Multiply aNumber and the receiver, answer the result

+ aNumber
     Sum the receiver and aNumber, answer the result

- aNumber
     Subtract aNumber from the receiver, answer the result

/ aNumber
     Divide aNumber and the receiver, answer the result (an Integer or
     Fraction)

// aNumber
     Divide aNumber and the receiver, answer the result truncated
     towards -infinity

\\ aNumber
     Divide aNumber and the receiver, answer the remainder truncated
     towards -infinity

quo: aNumber
     Divide aNumber and the receiver, answer the result truncated
     towards 0

rem: aNumber
     Divide aNumber and the receiver, answer the remainder truncated
     towards 0



File: gst-base.info,  Node: LargeZeroInteger-numeric testing,  Next: LargeZeroInteger-printing,  Prev: LargeZeroInteger-arithmetic,  Up: LargeZeroInteger

1.95.3 LargeZeroInteger: numeric testing
----------------------------------------

sign
     Answer the receiver's sign

strictlyPositive
     Answer whether the receiver is > 0



File: gst-base.info,  Node: LargeZeroInteger-printing,  Prev: LargeZeroInteger-numeric testing,  Up: LargeZeroInteger

1.95.4 LargeZeroInteger: printing
---------------------------------

replace: str withStringBase: radix
     Return in a string the base radix representation of the receiver.



File: gst-base.info,  Node: Link,  Next: LinkedList,  Prev: LargeZeroInteger,  Up: Base classes

1.96 Link
=========

Defined in namespace Smalltalk
Superclass: Object
Category: Collections-Sequenceable
     I represent simple linked lists.  Generally, I am not used by
     myself, but rather a subclass adds other instance variables that
     hold the information for each node, and I hold the glue that keeps
     them together.

* Menu:

* Link class-instance creation::  (class)
* Link-basic::  (instance)
* Link-iteration::  (instance)


File: gst-base.info,  Node: Link class-instance creation,  Next: Link-basic,  Up: Link

1.96.1 Link class: instance creation
------------------------------------

nextLink: aLink
     Create an instance with the given next link



File: gst-base.info,  Node: Link-basic,  Next: Link-iteration,  Prev: Link class-instance creation,  Up: Link

1.96.2 Link: basic
------------------

nextLink
     Answer the next item in the list

nextLink: aLink
     Set the next item in the list



File: gst-base.info,  Node: Link-iteration,  Prev: Link-basic,  Up: Link

1.96.3 Link: iteration
----------------------

at: index
     Retrieve a node (instance of Link) that is at a distance of `index'
     after the receiver.

at: index put: object
     This method should not be called for instances of this class.

do: aBlock
     Evaluate aBlock for each element in the list

size
     Answer the number of elements in the list. Warning: this is O(n)



File: gst-base.info,  Node: LinkedList,  Next: LookupKey,  Prev: Link,  Up: Base classes

1.97 LinkedList
===============

Defined in namespace Smalltalk
Superclass: SequenceableCollection
Category: Collections-Sequenceable
     I provide methods that access and manipulate linked lists.  I
     assume that the elements of the linked list are subclasses of
     Link, because I use the methods that class Link supplies to
     implement my methods.

* Menu:

* LinkedList-accessing::  (instance)
* LinkedList-adding::  (instance)
* LinkedList-enumerating::  (instance)
* LinkedList-testing::  (instance)


File: gst-base.info,  Node: LinkedList-accessing,  Next: LinkedList-adding,  Up: LinkedList

1.97.1 LinkedList: accessing
----------------------------

at: index
     Return the element that is index into the linked list.

at: index put: object
     This method should not be called for instances of this class.



File: gst-base.info,  Node: LinkedList-adding,  Next: LinkedList-enumerating,  Prev: LinkedList-accessing,  Up: LinkedList

1.97.2 LinkedList: adding
-------------------------

add: aLink
     Add aLink at the end of the list; return aLink.

addFirst: aLink
     Add aLink at the head of the list; return aLink.

addLast: aLink
     Add aLink at then end of the list; return aLink.

remove: aLink ifAbsent: aBlock
     Remove aLink from the list and return it, or invoke aBlock if it's
     not found in the list.

removeFirst
     Remove the first element from the list and return it, or error if
     the list is empty.

removeLast
     Remove the final element from the list and return it, or error if
     the list is empty.



File: gst-base.info,  Node: LinkedList-enumerating,  Next: LinkedList-testing,  Prev: LinkedList-adding,  Up: LinkedList

1.97.3 LinkedList: enumerating
------------------------------

do: aBlock
     Enumerate each object in the list, passing it to aBlock (actual
     behavior might depend on the subclass of Link that is being used).



File: gst-base.info,  Node: LinkedList-testing,  Prev: LinkedList-enumerating,  Up: LinkedList

1.97.4 LinkedList: testing
--------------------------

isEmpty
     Returns true if the list contains no members

notEmpty
     Returns true if the list contains at least a member

size
     Answer the number of elements in the list. Warning: this is O(n)



File: gst-base.info,  Node: LookupKey,  Next: LookupTable,  Prev: LinkedList,  Up: Base classes

1.98 LookupKey
==============

Defined in namespace Smalltalk
Superclass: Magnitude
Category: Language-Data types
     I represent a key for looking up entries in a data structure.
     Subclasses of me, such as Association, typically represent
     dictionary entries.

* Menu:

* LookupKey class-basic::  (class)
* LookupKey-accessing::  (instance)
* LookupKey-printing::  (instance)
* LookupKey-storing::  (instance)
* LookupKey-testing::  (instance)


File: gst-base.info,  Node: LookupKey class-basic,  Next: LookupKey-accessing,  Up: LookupKey

1.98.1 LookupKey class: basic
-----------------------------

key: aKey
     Answer a new instance of the receiver with the given key and value



File: gst-base.info,  Node: LookupKey-accessing,  Next: LookupKey-printing,  Prev: LookupKey class-basic,  Up: LookupKey

1.98.2 LookupKey: accessing
---------------------------

key
     Answer the receiver's key

key: aKey
     Set the receiver's key to aKey



File: gst-base.info,  Node: LookupKey-printing,  Next: LookupKey-storing,  Prev: LookupKey-accessing,  Up: LookupKey

1.98.3 LookupKey: printing
--------------------------

printOn: aStream
     Put on aStream a representation of the receiver



File: gst-base.info,  Node: LookupKey-storing,  Next: LookupKey-testing,  Prev: LookupKey-printing,  Up: LookupKey

1.98.4 LookupKey: storing
-------------------------

storeOn: aStream
     Put on aStream some Smalltalk code compiling to the receiver



File: gst-base.info,  Node: LookupKey-testing,  Prev: LookupKey-storing,  Up: LookupKey

1.98.5 LookupKey: testing
-------------------------

< aLookupKey
     Answer whether the receiver's key is less than aLookupKey's

= aLookupKey
     Answer whether the receiver's key and value are the same as
     aLookupKey's, or false if aLookupKey is not an instance of the
     receiver

hash
     Answer an hash value for the receiver



File: gst-base.info,  Node: LookupTable,  Next: Magnitude,  Prev: LookupKey,  Up: Base classes

1.99 LookupTable
================

Defined in namespace Smalltalk
Superclass: Dictionary
Category: Collections-Keyed
     I am similar to Dictionary, except that my representation is
     different (more efficient, but not useful to store a variable
     binding). I use the object equality comparison message #= to
     determine equivalence of indices.

* Menu:

* LookupTable class-instance creation::  (class)
* LookupTable-accessing::  (instance)
* LookupTable-copying::  (instance)
* LookupTable-enumerating::  (instance)
* LookupTable-hashing::  (instance)
* LookupTable-rehashing::  (instance)
* LookupTable-removing::  (instance)
* LookupTable-storing::  (instance)


File: gst-base.info,  Node: LookupTable class-instance creation,  Next: LookupTable-accessing,  Up: LookupTable

1.99.1 LookupTable class: instance creation
-------------------------------------------

new
     Create a new LookupTable with a default size

primNew: realSize
     Not commented.



File: gst-base.info,  Node: LookupTable-accessing,  Next: LookupTable-copying,  Prev: LookupTable class-instance creation,  Up: LookupTable

1.99.2 LookupTable: accessing
-----------------------------

add: anAssociation
     Add the anAssociation key to the receiver

associationAt: key ifAbsent: aBlock
     Answer the key/value Association for the given key. Evaluate aBlock
     (answering the result) if the key is not found

at: key ifAbsent: aBlock
     Answer the value associated to the given key, or the result of
     evaluating aBlock if the key is not found

at: aKey ifPresent: aBlock
     If aKey is absent, answer nil. Else, evaluate aBlock passing the
     associated value and answer the result of the invocation

at: key put: value
     Store value as associated to the given key



File: gst-base.info,  Node: LookupTable-copying,  Next: LookupTable-enumerating,  Prev: LookupTable-accessing,  Up: LookupTable

1.99.3 LookupTable: copying
---------------------------

deepCopy
     Returns a deep copy of the receiver (the instance variables are
     copies of the receiver's instance variables)



File: gst-base.info,  Node: LookupTable-enumerating,  Next: LookupTable-hashing,  Prev: LookupTable-copying,  Up: LookupTable

1.99.4 LookupTable: enumerating
-------------------------------

associationsDo: aBlock
     Pass each association in the LookupTable to aBlock.

do: aBlock
     Pass each value in the LookupTable to aBlock.

keysAndValuesDo: aBlock
     Pass each key/value pair in the LookupTable as two distinct
     parameters to aBlock.

keysDo: aBlock
     Pass each key in the LookupTable to aBlock.



File: gst-base.info,  Node: LookupTable-hashing,  Next: LookupTable-rehashing,  Prev: LookupTable-enumerating,  Up: LookupTable

1.99.5 LookupTable: hashing
---------------------------

hash
     Answer the hash value for the receiver



File: gst-base.info,  Node: LookupTable-rehashing,  Next: LookupTable-removing,  Prev: LookupTable-hashing,  Up: LookupTable

1.99.6 LookupTable: rehashing
-----------------------------

rehash
     Rehash the receiver



File: gst-base.info,  Node: LookupTable-removing,  Next: LookupTable-storing,  Prev: LookupTable-rehashing,  Up: LookupTable

1.99.7 LookupTable: removing
----------------------------

remove: anAssociation
     Remove anAssociation's key from the dictionary

remove: anAssociation ifAbsent: aBlock
     Remove anAssociation's key from the dictionary

removeKey: key ifAbsent: aBlock
     Remove the passed key from the LookupTable, answer the result of
     evaluating aBlock if it is not found



File: gst-base.info,  Node: LookupTable-storing,  Prev: LookupTable-removing,  Up: LookupTable

1.99.8 LookupTable: storing
---------------------------

storeOn: aStream
     Print Smalltalk code compiling to the receiver on aStream



File: gst-base.info,  Node: Magnitude,  Next: MappedCollection,  Prev: LookupTable,  Up: Base classes

1.100 Magnitude
===============

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Data types
     I am an abstract class.  My objects represent things that are
     discrete and map to a number line.  My instances can be compared
     with < and >.

* Menu:

* Magnitude-basic::  (instance)
* Magnitude-misc methods::  (instance)


File: gst-base.info,  Node: Magnitude-basic,  Next: Magnitude-misc methods,  Up: Magnitude

1.100.1 Magnitude: basic
------------------------

< aMagnitude
     Answer whether the receiver is less than aMagnitude

<= aMagnitude
     Answer whether the receiver is less than or equal to aMagnitude

"Relational operators
     This method's functionality should be implemented by subclasses of
     Magnitude

> aMagnitude
     Answer whether the receiver is greater than aMagnitude

>= aMagnitude
     Answer whether the receiver is greater than or equal to aMagnitude



File: gst-base.info,  Node: Magnitude-misc methods,  Prev: Magnitude-basic,  Up: Magnitude

1.100.2 Magnitude: misc methods
-------------------------------

between: min and: max
     Returns true if object is inclusively between min and max.

max: aMagnitude
     Returns the greatest object between the receiver and aMagnitude

min: aMagnitude
     Returns the least object between the receiver and aMagnitude



File: gst-base.info,  Node: MappedCollection,  Next: Memory,  Prev: Magnitude,  Up: Base classes

1.101 MappedCollection
======================

Defined in namespace Smalltalk
Superclass: Collection
Category: Collections-Keyed
     I represent collections of objects that are indirectly indexed by
     names.  There are really two collections involved: domain and a
     map.  The map maps between external names and indices into domain,
     which contains the real association.  In order to work properly,
     the domain must be an instance of a subclass of
     SequenceableCollection, and the map must be an instance of
     Dictionary, or of a subclass of SequenceableCollection.

     As an example of using me, consider implenting a Dictionary whose
     elements are indexed. The domain would be a SequenceableCollection
     with n elements, the map a Dictionary associating each key to an
     index in the domain. To access by key, to perform enumeration,
     etc. you would ask an instance of me; to access by index, you
     would access the domain directly.

     Another idea could be to implement row access or column access to
     a matrix implemented as a single n*m Array: the Array would be the
     domain, while the map would be an Interval.


* Menu:

* MappedCollection class-instance creation::  (class)
* MappedCollection-basic::  (instance)


File: gst-base.info,  Node: MappedCollection class-instance creation,  Next: MappedCollection-basic,  Up: MappedCollection

1.101.1 MappedCollection class: instance creation
-------------------------------------------------

collection: aCollection map: aMap
     Answer a new MappedCollection using the given domain (aCollection)
     and map

new
     This method should not be used; instead, use #collection:map: to
     create MappedCollection.



File: gst-base.info,  Node: MappedCollection-basic,  Prev: MappedCollection class-instance creation,  Up: MappedCollection

1.101.2 MappedCollection: basic
-------------------------------

add: anObject
     This method should not be called for instances of this class.

at: key
     Answer the object at the given key

at: key put: value
     Store value at the given key

collect: aBlock
     Answer a MappedCollection with a copy of the receiver's map and a
     domain obtained by passing each object through aBlock

contents
     Answer a bag with the receiver's values

do: aBlock
     Evaluate aBlock for each object

domain
     Answer the domain

map
     Answer the map

reject: aBlock
     Answer the objects in the domain for which aBlock returns false

select: aBlock
     Answer the objects in the domain for which aBlock returns true

size
     Answer the receiver's size



File: gst-base.info,  Node: Memory,  Next: Message,  Prev: MappedCollection,  Up: Base classes

1.102 Memory
============

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Implementation
     I provide access to actual machine addresses of OOPs and objects.
     I have no instances; you send messages to my class to map between
     an object and the address of its OOP or object. In addition I
     provide direct memory access with different C types (ints, chars,
     OOPs, floats,...).

* Menu:

* Memory class-accessing::  (class)


File: gst-base.info,  Node: Memory class-accessing,  Up: Memory

1.102.1 Memory class: accessing
-------------------------------

"Note that
     Not commented.

"Storing methods
     at: anAddress put: aValue

bigEndian
     Answer whether we're running on a big- or little-endian system.

charAt: anAddress
     Access the C char at the given address. The value is returned as a
     Smalltalk Character.

charAt: anAddress put: aValue
     Store as a C char the Smalltalk Character or Integer object
     identified by `value', at the given address, using sizeof(char)
     bytes - i.e. 1 byte.

deref: anAddress
     Access the C int pointed by the given address

doubleAt: anAddress
     Access the C double at the given address.

doubleAt: anAddress put: aValue
     Store the Smalltalk Float object identified by `value', at the
     given address, writing it like a C double.

floatAt: anAddress
     Access the C float at the given address.

floatAt: anAddress put: aValue
     Store the Smalltalk Float object identified by `value', at the
     given address, writing it like a C float.

intAt: anAddress
     Access the C int at the given address.

intAt: anAddress put: aValue
     Store the Smalltalk Integer object identified by `value', at the
     given address, using sizeof(int) bytes.

longAt: anAddress
     Access the C long int at the given address.

longAt: anAddress put: aValue
     Store the Smalltalk Integer object identified by `value', at the
     given address, using sizeof(long) bytes.

longDoubleAt: anAddress
     Access the C long double at the given address.

longDoubleAt: anAddress put: aValue
     Store the Smalltalk Float object identified by `value', at the
     given address, writing it like a C long double.

shortAt: anAddress
     Access the C short int at the given address.

shortAt: anAddress put: aValue
     Store the Smalltalk Integer object identified by `value', at the
     given address, using sizeof(short) bytes.

stringAt: anAddress
     Access the string pointed by the C `char *' at the given given
     address.

stringAt: anAddress put: aValue
     Store the Smalltalk String object identified by `value', at the
     given address in memory, writing it like a *FRESHLY ALLOCATED* C
     string. It is the caller's responsibility to free it if necessary.

ucharAt: anAddress put: aValue
     Store as a C char the Smalltalk Character or Integer object
     identified by `value', at the given address, using sizeof(char)
     bytes - i.e. 1 byte.

uintAt: anAddress put: aValue
     Store the Smalltalk Integer object identified by `value', at the
     given address, using sizeof(int) bytes.

ulongAt: anAddress put: aValue
     Store the Smalltalk Integer object identified by `value', at the
     given address, using sizeof(long) bytes.

unsignedCharAt: anAddress
     Access the C unsigned char at the given address.  The value is
     returned as a Smalltalk Character.

unsignedCharAt: anAddress put: aValue
     Store as a C char the Smalltalk Character or Integer object
     identified by `value', at the given address, using sizeof(char)
     bytes - i.e. 1 byte.

unsignedIntAt: anAddress
     Access the C unsigned int at the given address.

unsignedIntAt: anAddress put: aValue
     Store the Smalltalk Integer object identified by `value', at the
     given address, using sizeof(int) bytes.

unsignedLongAt: anAddress
     Access the C unsigned long int at the given address.

unsignedLongAt: anAddress put: aValue
     Store the Smalltalk Integer object identified by `value', at the
     given address, using sizeof(long) bytes.

unsignedShortAt: anAddress
     Access the C unsigned short int at the given address.

unsignedShortAt: anAddress put: aValue
     Store the Smalltalk Integer object identified by `value', at the
     given address, using sizeof(short) bytes.

ushortAt: anAddress put: aValue
     Store the Smalltalk Integer object identified by `value', at the
     given address, using sizeof(short) bytes.



File: gst-base.info,  Node: Message,  Next: MessageNotUnderstood,  Prev: Memory,  Up: Base classes

1.103 Message
=============

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Implementation
     I represent a message send.  My instances are created to hold a
     message that has failed, so that error reporting methods can
     examine the sender and arguments, but also to represent method
     attributes (like <primitive: 111> since their syntax is isomorphic
     to that of a message send.

* Menu:

* Message class-creating instances::  (class)
* Message-accessing::  (instance)
* Message-basic::  (instance)
* Message-printing::  (instance)


File: gst-base.info,  Node: Message class-creating instances,  Next: Message-accessing,  Up: Message

1.103.1 Message class: creating instances
-----------------------------------------

selector: aSymbol arguments: anArray
     Create a new Message with the given selector and arguments



File: gst-base.info,  Node: Message-accessing,  Next: Message-basic,  Prev: Message class-creating instances,  Up: Message

1.103.2 Message: accessing
--------------------------

argument
     Answer the first of the receiver's arguments

arguments
     Answer the receiver's arguments

arguments: anArray
     Set the receiver's arguments

selector
     Answer the receiver's selector

selector: aSymbol
     Set the receiver's selector



File: gst-base.info,  Node: Message-basic,  Next: Message-printing,  Prev: Message-accessing,  Up: Message

1.103.3 Message: basic
----------------------

printAsAttributeOn: aStream
     Print a representation of the receiver on aStream, modeling it
     after the source code for a attribute.



File: gst-base.info,  Node: Message-printing,  Prev: Message-basic,  Up: Message

1.103.4 Message: printing
-------------------------

printOn: aStream
     Print a representation of the receiver on aStream

reinvokeFor: aReceiver
     Resend to aReceiver - present for compatibility

sendTo: aReceiver
     Resend to aReceiver



File: gst-base.info,  Node: MessageNotUnderstood,  Next: Metaclass,  Prev: Message,  Up: Base classes

1.104 MessageNotUnderstood
==========================

Defined in namespace Smalltalk
Superclass: Halt
Category: Language-Exceptions
     MessageNotUnderstood represents an error during message lookup.
     Signaling it is the default action of the #doesNotUnderstand:
     handler

* Menu:

* MessageNotUnderstood-accessing::  (instance)
* MessageNotUnderstood-description::  (instance)


File: gst-base.info,  Node: MessageNotUnderstood-accessing,  Next: MessageNotUnderstood-description,  Up: MessageNotUnderstood

1.104.1 MessageNotUnderstood: accessing
---------------------------------------

message
     Answer the message that wasn't understood

receiver
     Answer the object to whom the message send was directed



File: gst-base.info,  Node: MessageNotUnderstood-description,  Prev: MessageNotUnderstood-accessing,  Up: MessageNotUnderstood

1.104.2 MessageNotUnderstood: description
-----------------------------------------

description
     Answer a textual description of the exception.



File: gst-base.info,  Node: Metaclass,  Next: MethodContext,  Prev: MessageNotUnderstood,  Up: Base classes

1.105 Metaclass
===============

Defined in namespace Smalltalk
Superclass: ClassDescription
Category: Language-Implementation
     I am the root of the class hierarchy.  My instances are
     metaclasses, one for each real class.  My instances have a single
     instance, which they hold onto, which is the class that they are
     the metaclass of.  I provide methods for creation of actual class
     objects from metaclass object, and the creation of metaclass
     objects, which are my instances.  If this is confusing to you, it
     should be...the Smalltalk metaclass system is strange and complex.

* Menu:

* Metaclass class-instance creation::  (class)
* Metaclass-accessing::  (instance)
* Metaclass-basic::  (instance)
* Metaclass-delegation::  (instance)
* Metaclass-filing::  (instance)
* Metaclass-printing::  (instance)
* Metaclass-testing functionality::  (instance)


File: gst-base.info,  Node: Metaclass class-instance creation,  Next: Metaclass-accessing,  Up: Metaclass

1.105.1 Metaclass class: instance creation
------------------------------------------

subclassOf: superMeta
     Answer a new metaclass representing a subclass of superMeta



File: gst-base.info,  Node: Metaclass-accessing,  Next: Metaclass-basic,  Prev: Metaclass class-instance creation,  Up: Metaclass

1.105.2 Metaclass: accessing
----------------------------

instanceClass
     Answer the only instance of the metaclass

primaryInstance
     Answer the only instance of the metaclass - present for
     compatibility

soleInstance
     Answer the only instance of the metaclass - present for
     compatibility



File: gst-base.info,  Node: Metaclass-basic,  Next: Metaclass-delegation,  Prev: Metaclass-accessing,  Up: Metaclass

1.105.3 Metaclass: basic
------------------------

instanceVariableNames: classInstVarNames
     Set the class-instance variables for the receiver to be those in
     classInstVarNames

name: className
     environment: aNamespace     subclassOf: superclass
     instanceVariableArray: variableArray     shape: shape
     classPool: classVarDict     poolDictionaries: sharedPoolNames
     category: categoryName Private - create a full featured class and
     install it, or change an existing one

name: newName
     environment: aNamespace     subclassOf: superclass
     instanceVariableNames: stringOfInstVarNames     shape: shape
     classVariableNames: stringOfClassVarNames     poolDictionaries:
     stringOfPoolNames     category: categoryName Private - parse the
     instance and class variables, and the pool dictionaries, then
     create the class.

newMeta: className
     environment: aNamespace     subclassOf: superclass
     instanceVariableArray: arrayOfInstVarNames     shape: shape
     classPool: classVarDict     poolDictionaries: sharedPoolNames
     category: categoryName Private - create a full featured class and
     install it



File: gst-base.info,  Node: Metaclass-delegation,  Next: Metaclass-filing,  Prev: Metaclass-basic,  Up: Metaclass

1.105.4 Metaclass: delegation
-----------------------------

addClassVarName: aString
     Add a class variable with the given name to the class pool
     dictionary

addSharedPool: aDictionary
     Add the given shared pool to the list of the class' pool
     dictionaries

allClassVarNames
     Answer the names of the variables in the receiver's class pool
     dictionary and in each of the superclasses' class pool dictionaries

allSharedPools
     Return the names of the shared pools defined by the class and any
     of its superclasses

category
     Answer the class category

classPool
     Answer the class pool dictionary

classVarNames
     Answer the names of the variables in the class pool dictionary

comment
     Answer the class comment

debuggerClass
     Answer the debugger class that was set in the instance class

environment
     Answer the namespace in which the receiver is implemented

name
     Answer the class name - it has none, actually

pragmaHandlerFor: aSymbol
     Not commented.

removeClassVarName: aString
     Removes the class variable from the class, error if not present, or
     still in use.

removeSharedPool: aDictionary
     Remove the given dictionary to the list of the class' pool
     dictionaries

sharedPools
     Return the names of the shared pools defined by the class



File: gst-base.info,  Node: Metaclass-filing,  Next: Metaclass-printing,  Prev: Metaclass-delegation,  Up: Metaclass

1.105.5 Metaclass: filing
-------------------------

fileOutOn: aFileStream
     File out complete class description:  class definition, class and
     instance methods



File: gst-base.info,  Node: Metaclass-printing,  Next: Metaclass-testing functionality,  Prev: Metaclass-filing,  Up: Metaclass

1.105.6 Metaclass: printing
---------------------------

nameIn: aNamespace
     Answer the class name when the class is referenced from aNamespace.

printOn: aStream
     Print a represention of the receiver on aStream

printOn: aStream in: aNamespace
     Print on aStream the class name when the class is referenced from
     aNamespace.

storeOn: aStream
     Store Smalltalk code compiling to the receiver on aStream



File: gst-base.info,  Node: Metaclass-testing functionality,  Prev: Metaclass-printing,  Up: Metaclass

1.105.7 Metaclass: testing functionality
----------------------------------------

asClass
     Answer `instanceClass'.

isMetaclass
     Answer `true'.



File: gst-base.info,  Node: MethodContext,  Next: MethodDictionary,  Prev: Metaclass,  Up: Base classes

1.106 MethodContext
===================

Defined in namespace Smalltalk
Superclass: ContextPart
Category: Language-Implementation
     My instances represent an actively executing method.  They record
     various bits of information about the execution environment, and
     contain the execution stack.

* Menu:

* MethodContext-accessing::  (instance)
* MethodContext-debugging::  (instance)
* MethodContext-printing::  (instance)


File: gst-base.info,  Node: MethodContext-accessing,  Next: MethodContext-debugging,  Up: MethodContext

1.106.1 MethodContext: accessing
--------------------------------

home
     Answer the MethodContext to which the receiver refers (i.e. the
     receiver itself)

isBlock
     Answer whether the receiver is a block context

     block

isDisabled
     Answers whether the receiver has actually ended execution and will
     be skipped when doing a return.  BlockContexts are removed from the
     chain whenever a non-local return is done, but MethodContexts need
     to stay there in case there is a non-local return from the #ensure:
     block.

isEnvironment
     To create a valid execution environment for the interpreter even
     before it starts, GST creates a fake context which invokes a
     special "termination" method.  Such a context can be used as a
     marker for the current execution environment.  Answer whether the
     receiver is that kind of context.

isUnwind
     Answers whether the context must continue execution even after a
     non-local return (a return from the enclosing method of a block, or
     a call to the #continue: method of ContextPart).  Such contexts are
     created only by #ensure:.

sender
     Return the context from which the receiver was sent



File: gst-base.info,  Node: MethodContext-debugging,  Next: MethodContext-printing,  Prev: MethodContext-accessing,  Up: MethodContext

1.106.2 MethodContext: debugging
--------------------------------

isInternalExceptionHandlingContext
     Answer whether the receiver is a context that should be hidden to
     the user when presenting a backtrace.  Such contexts are
     identified through the #exceptionHandlingInternal: attribute: if
     there is such a context in the backtrace, all those above it are
     marked as internal.  That is, the attribute being set to true
     means that the context and all those above it are to be hidden,
     while the attribute being set to false means that the contexts
     above it must be hidden, but not the context itself.



File: gst-base.info,  Node: MethodContext-printing,  Prev: MethodContext-debugging,  Up: MethodContext

1.106.3 MethodContext: printing
-------------------------------

printOn: aStream
     Print a representation for the receiver on aStream



File: gst-base.info,  Node: MethodDictionary,  Next: MethodInfo,  Prev: MethodContext,  Up: Base classes

1.107 MethodDictionary
======================

Defined in namespace Smalltalk
Superclass: LookupTable
Category: Language-Implementation
     I am similar to an IdentityDictionary, except that removal and
     rehashing operations inside my instances look atomic to the
     interpreter.

* Menu:

* MethodDictionary-adding::  (instance)
* MethodDictionary-rehashing::  (instance)
* MethodDictionary-removing::  (instance)


File: gst-base.info,  Node: MethodDictionary-adding,  Next: MethodDictionary-rehashing,  Up: MethodDictionary

1.107.1 MethodDictionary: adding
--------------------------------

at: key put: value
     Store value as associated to the given key



File: gst-base.info,  Node: MethodDictionary-rehashing,  Next: MethodDictionary-removing,  Prev: MethodDictionary-adding,  Up: MethodDictionary

1.107.2 MethodDictionary: rehashing
-----------------------------------

rehash
     Rehash the receiver



File: gst-base.info,  Node: MethodDictionary-removing,  Prev: MethodDictionary-rehashing,  Up: MethodDictionary

1.107.3 MethodDictionary: removing
----------------------------------

remove: anAssociation
     Remove anAssociation's key from the dictionary

removeKey: anElement ifAbsent: aBlock
     Remove the passed key from the dictionary, answer the result of
     evaluating aBlock if it is not found



File: gst-base.info,  Node: MethodInfo,  Next: Namespace,  Prev: MethodDictionary,  Up: Base classes

1.108 MethodInfo
================

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Implementation
     I provide information about particular methods.  I can produce the
     category that a method was filed under, and can be used to access
     the source code of the method.

* Menu:

* MethodInfo-accessing::  (instance)
* MethodInfo-equality::  (instance)


File: gst-base.info,  Node: MethodInfo-accessing,  Next: MethodInfo-equality,  Up: MethodInfo

1.108.1 MethodInfo: accessing
-----------------------------

category
     Answer the method category

category: aCategory
     Set the method category

methodClass
     Answer the class in which the method is defined

methodClass: aClass
     Set the class in which the method is defined

selector
     Answer the selector through which the method is called

selector: aSymbol
     Set the selector through which the method is called

sourceCode
     Answer a FileSegment or String or nil containing the method source
     code

sourceFile
     Answer the name of the file where the method source code is

sourcePos
     Answer the starting position of the method source code in the
     sourceFile

sourceString
     Answer a String containing the method source code

stripSourceCode
     Remove the reference to the source code for the method



File: gst-base.info,  Node: MethodInfo-equality,  Prev: MethodInfo-accessing,  Up: MethodInfo

1.108.2 MethodInfo: equality
----------------------------

= aMethodInfo
     Compare the receiver and aMethodInfo, answer whether they're equal

hash
     Answer an hash value for the receiver



File: gst-base.info,  Node: Namespace,  Next: NetClients.URIResolver,  Prev: MethodInfo,  Up: Base classes

1.109 Namespace
===============

Defined in namespace Smalltalk
Superclass: AbstractNamespace
Category: Language-Implementation
     I am a Namespace that has a super-namespace.

* Menu:

* Namespace class-accessing::  (class)
* Namespace class-disabling instance creation::  (class)
* Namespace class-initialization::  (class)
* Namespace-accessing::  (instance)
* Namespace-namespace hierarchy::  (instance)
* Namespace-overrides for superspaces::  (instance)
* Namespace-printing::  (instance)


File: gst-base.info,  Node: Namespace class-accessing,  Next: Namespace class-disabling instance creation,  Up: Namespace

1.109.1 Namespace class: accessing
----------------------------------

current
     Answer the current namespace

current: aNamespaceOrClass
     Set the current namespace to be aNamespace or, if it is a class,
     its class pool (the Dictionary that holds class variables).



File: gst-base.info,  Node: Namespace class-disabling instance creation,  Next: Namespace class-initialization,  Prev: Namespace class-accessing,  Up: Namespace

1.109.2 Namespace class: disabling instance creation
----------------------------------------------------

new
     Disabled - use #addSubspace: to create instances

new: size
     Disabled - use #addSubspace: to create instances



File: gst-base.info,  Node: Namespace class-initialization,  Next: Namespace-accessing,  Prev: Namespace class-disabling instance creation,  Up: Namespace

1.109.3 Namespace class: initialization
---------------------------------------

initialize
     This actually is not needed, the job could be done in dict.c
     (function namespace_new).  But I'm lazy and I prefer to rely on
     the Smalltalk implementation of IdentitySet.



File: gst-base.info,  Node: Namespace-accessing,  Next: Namespace-namespace hierarchy,  Prev: Namespace class-initialization,  Up: Namespace

1.109.4 Namespace: accessing
----------------------------

inheritedKeys
     Answer a Set of all the keys in the receiver and its superspaces



File: gst-base.info,  Node: Namespace-namespace hierarchy,  Next: Namespace-overrides for superspaces,  Prev: Namespace-accessing,  Up: Namespace

1.109.5 Namespace: namespace hierarchy
--------------------------------------

siblings
     Answer all the other namespaces that inherit from the receiver's
     superspace.

siblingsDo: aBlock
     Evaluate aBlock once for each of the other namespaces that inherit
     from the receiver's superspace, passing the namespace as a
     parameter.



File: gst-base.info,  Node: Namespace-overrides for superspaces,  Next: Namespace-printing,  Prev: Namespace-namespace hierarchy,  Up: Namespace

1.109.6 Namespace: overrides for superspaces
--------------------------------------------

associationAt: key ifAbsent: aBlock
     Return the key/value pair associated to the variable named as
     specified by `key'. If the key is not found search will be brought
     on in superspaces, finally evaluating aBlock if the variable
     cannot be found in any of the superspaces.

associationsDo: aBlock
     Pass each association in the namespace to aBlock

at: key ifAbsent: aBlock
     Return the value associated to the variable named as specified by
     `key'. If the key is not found search will be brought on in
     superspaces, finally evaluating aBlock if the variable cannot be
     found in any of the superspaces.

at: key ifPresent: aBlock
     If aKey is absent from the receiver and all its superspaces,
     answer nil. Else, evaluate aBlock passing the associated value and
     answer the result of the invocation

do: aBlock
     Pass each value in the namespace to aBlock

includesKey: key
     Answer whether the receiver or any of its superspaces contain the
     given key

keysAndValuesDo: aBlock
     Pass to aBlock each of the receiver's keys and values, in two
     separate parameters

keysDo: aBlock
     Pass to aBlock each of the receiver's keys

set: key to: newValue ifAbsent: aBlock
     Assign newValue to the variable named as specified by `key'.  This
     method won't define a new variable; instead if the key is not
     found it will search in superspaces and evaluate aBlock if it is
     not found. Answer newValue.

size
     Answer the number of keys in the receiver and each of its
     superspaces



File: gst-base.info,  Node: Namespace-printing,  Prev: Namespace-overrides for superspaces,  Up: Namespace

1.109.7 Namespace: printing
---------------------------

nameIn: aNamespace
     Answer Smalltalk code compiling to the receiver when the current
     namespace is aNamespace

printOn: aStream in: aNamespace
     Print on aStream some Smalltalk code compiling to the receiver
     when the current namespace is aNamespace

storeOn: aStream
     Store Smalltalk code compiling to the receiver



File: gst-base.info,  Node: NetClients.URIResolver,  Next: NetClients.URL,  Prev: Namespace,  Up: Base classes

1.110 NetClients.URIResolver
============================

Defined in namespace Smalltalk.NetClients
Superclass: Object
Category: NetClients-URIResolver
     This class publishes methods to download files from the Internet.

* Menu:

* NetClients.URIResolver class-api::  (class)
* NetClients.URIResolver class-instance creation::  (class)


File: gst-base.info,  Node: NetClients.URIResolver class-api,  Next: NetClients.URIResolver class-instance creation,  Up: NetClients.URIResolver

1.110.1 NetClients.URIResolver class: api
-----------------------------------------

openOn: aURI
     Always raise an error, as this method is not supported without
     loading the additional NetClients package.

openOn: aURI ifFail: aBlock
     Always evaluate aBlock and answer the result if the additional
     NetClients package is not loaded.  If it is, instead, return a
     WebEntity with the contents of the resource specified by anURI,
     and only evaluate the block if loading the resource fails.

openStreamOn: aURI
     Check if aURI can be fetched from the Internet or from the local
     system, and if so return a Stream with its contents.  If this is
     not possible, raise an exception.

openStreamOn: aURI ifFail: aBlock
     Check if aURI can be fetched from the Internet or from the local
     system, and if so return a Stream with its contents.  If this is
     not possible, instead, evaluate the zero-argument block aBlock and
     answer the result of the evaluation.



File: gst-base.info,  Node: NetClients.URIResolver class-instance creation,  Prev: NetClients.URIResolver class-api,  Up: NetClients.URIResolver

1.110.2 NetClients.URIResolver class: instance creation
-------------------------------------------------------

on: anURL
     Answer a new URIResolver that will do its best to fetch the data
     for anURL from the Internet.



File: gst-base.info,  Node: NetClients.URL,  Next: Notification,  Prev: NetClients.URIResolver,  Up: Base classes

1.111 NetClients.URL
====================

Defined in namespace Smalltalk.NetClients
Superclass: Object
Category: NetClients-URIResolver
     Copyright (c) Kazuki Yasumatsu, 1995. All rights reserved.


* Menu:

* NetClients.URL class-encoding URLs::  (class)
* NetClients.URL class-instance creation::  (class)
* NetClients.URL-accessing::  (instance)
* NetClients.URL-comparing::  (instance)
* NetClients.URL-copying::  (instance)
* NetClients.URL-initialize-release::  (instance)
* NetClients.URL-printing::  (instance)
* NetClients.URL-testing::  (instance)
* NetClients.URL-utilities::  (instance)


File: gst-base.info,  Node: NetClients.URL class-encoding URLs,  Next: NetClients.URL class-instance creation,  Up: NetClients.URL

1.111.1 NetClients.URL class: encoding URLs
-------------------------------------------

decode: aString
     Decode a text/x-www-form-urlencoded String into a text/plain
     String.

encode: anURL
     Encode a text/plain into a text/x-www-form-urlencoded String (those
     things with lots of % in them).

initialize
     Initialize the receiver's class variables.



File: gst-base.info,  Node: NetClients.URL class-instance creation,  Next: NetClients.URL-accessing,  Prev: NetClients.URL class-encoding URLs,  Up: NetClients.URL

1.111.2 NetClients.URL class: instance creation
-----------------------------------------------

fromString: aString
     Parse the given URL and answer an URL object based on it.

new
     Answer a 'blank' URL.

scheme: schemeString host: hostString port: portNumber path: pathString
     Answer an URL object made from all the parts passed as arguments.

scheme: schemeString path: pathString
     Answer an URL object made from all the parts passed as arguments.

scheme: schemeString username: userString password: passwordString host: hostString port: portNumber path: pathString
     Answer an URL object made from all the parts passed as arguments.



File: gst-base.info,  Node: NetClients.URL-accessing,  Next: NetClients.URL-comparing,  Prev: NetClients.URL class-instance creation,  Up: NetClients.URL

1.111.3 NetClients.URL: accessing
---------------------------------

decodedFields
     Convert the form fields to a Dictionary, answer nil if no question
     mark is found in the URL.

decodedFile
     Answer the file part of the URL, decoding it from
     x-www-form-urlencoded format.

decodedFragment
     Answer the fragment part of the URL, decoding it from
     x-www-form-urlencoded format.

fragment
     Answer the fragment part of the URL, leaving it in
     x-www-form-urlencoded format.

fragment: aString
     Set the fragment part of the URL, which should be in
     x-www-form-urlencoded format.

fullRequestString
     Answer the full request string corresponding to the URL.  This is
     how the URL would be printed in the address bar of a web browser,
     except that the query data is printed even if it is to be sent
     through a POST request.

hasPostData
     Answer whether the URL has a query part but is actually for an
     HTTP POST request and not really part of the URL (as it would be
     for the HTTP GET request).

hasPostData: aBoolean
     Set whether the query part of the URL is actually the data for an
     HTTP POST request and not really part of the URL (as it would be
     for the HTTP GET request).

host
     Answer the host part of the URL.

host: aString
     Set the host part of the URL to aString.

newsGroup
     If the receiver is an nntp url, return the news group.

password
     Answer the password part of the URL.

password: aString
     Set the password part of the URL to aString.

path
     Answer the path part of the URL.

path: aString
     Set the path part of the URL to aString.

port
     Answer the port number part of the URL.

port: anInteger
     Set the port number part of the URL to anInteger.

postData
     Answer whether the URL has a query part and it is meant for an
     HTTP POST request, answer it.  Else answer nil.

postData: aString
     Associate to the URL some data that is meant to be sent through an
     HTTP POST request, answer it.

query
     Answer the query data associated to the URL.

query: aString
     Set the query data associated to the URL to aString.

requestString
     Answer the URL as it would be sent in an HTTP stream (that is, the
     path and the query data, the latter only if it is to be sent with
     an HTTP POST request).

scheme
     Answer the URL's scheme.

scheme: aString
     Set the URL's scheme to be aString.

username
     Answer the username part of the URL.

username: aString
     Set the username part of the URL to aString.



File: gst-base.info,  Node: NetClients.URL-comparing,  Next: NetClients.URL-copying,  Prev: NetClients.URL-accessing,  Up: NetClients.URL

1.111.4 NetClients.URL: comparing
---------------------------------

= anURL
     Answer whether the two URLs are equal.  The file and anchor are
     converted to full 8-bit ASCII (contrast with urlencoded) and the
     comparison is case-sensitive; on the other hand, the protocol and
     host are compared without regard to case.

hash
     Answer an hash value for the receiver



File: gst-base.info,  Node: NetClients.URL-copying,  Next: NetClients.URL-initialize-release,  Prev: NetClients.URL-comparing,  Up: NetClients.URL

1.111.5 NetClients.URL: copying
-------------------------------

copyWithoutAuxiliaryParts
     Answer a copy of the receiver where the fragment and query parts
     of the URL have been cleared.

copyWithoutFragment
     Answer a copy of the receiver where the fragment parts of the URL
     has been cleared.

postCopy
     All the variables are copied when an URL object is copied.



File: gst-base.info,  Node: NetClients.URL-initialize-release,  Next: NetClients.URL-printing,  Prev: NetClients.URL-copying,  Up: NetClients.URL

1.111.6 NetClients.URL: initialize-release
------------------------------------------

initialize
     Initialize the object to a consistent state.



File: gst-base.info,  Node: NetClients.URL-printing,  Next: NetClients.URL-testing,  Prev: NetClients.URL-initialize-release,  Up: NetClients.URL

1.111.7 NetClients.URL: printing
--------------------------------

printOn: stream
     Print a representation of the URL on the given stream.



File: gst-base.info,  Node: NetClients.URL-testing,  Next: NetClients.URL-utilities,  Prev: NetClients.URL-printing,  Up: NetClients.URL

1.111.8 NetClients.URL: testing
-------------------------------

canCache
     Answer whether the URL is cacheable.  The current implementation
     considers file URLs not to be cacheable, and everything else to be.

hasFragment
     Answer whether the URL points to a particular fragment (anchor) of
     the resource.

hasQuery
     Answer whether the URL includes query arguments to be submitted
     when retrieving the resource.

isFileScheme
     Answer whether the URL is a file URL.

isFragmentOnly
     Answer whether the URL only includes the name of a particular
     fragment (anchor) of the resource to which it refers.



File: gst-base.info,  Node: NetClients.URL-utilities,  Prev: NetClients.URL-testing,  Up: NetClients.URL

1.111.9 NetClients.URL: utilities
---------------------------------

construct: anURL
     Construct an absolute URL based on the relative URL anURL and the
     base path represented by the receiver



File: gst-base.info,  Node: Notification,  Next: NullProxy,  Prev: NetClients.URL,  Up: Base classes

1.112 Notification
==================

Defined in namespace Smalltalk
Superclass: Exception
Category: Language-Exceptions
     Notification represents a resumable, exceptional yet non-erroneous,
     situation.  Signaling a notification in absence of an handler
     simply returns nil.

* Menu:

* Notification-exception description::  (instance)


File: gst-base.info,  Node: Notification-exception description,  Up: Notification

1.112.1 Notification: exception description
-------------------------------------------

defaultAction
     Do the default action for notifications, which is to resume
     execution of the context which signaled the exception.

description
     Answer a textual description of the exception.

isResumable
     Answer true.  Notification exceptions are by default resumable.



File: gst-base.info,  Node: NullProxy,  Next: NullValueHolder,  Prev: Notification,  Up: Base classes

1.113 NullProxy
===============

Defined in namespace Smalltalk
Superclass: AlternativeObjectProxy
Category: Streams-Files
     I am a proxy that does no special processing on the object to be
     saved. I can be used to disable proxies for particular subclasses.
     My subclasses add to the stored information, but share the fact
     that the format is about the same as that of #dump: without a
     proxy.

* Menu:

* NullProxy class-instance creation::  (class)
* NullProxy-accessing::  (instance)


File: gst-base.info,  Node: NullProxy class-instance creation,  Next: NullProxy-accessing,  Up: NullProxy

1.113.1 NullProxy class: instance creation
------------------------------------------

loadFrom: anObjectDumper
     Reload the object stored in anObjectDumper



File: gst-base.info,  Node: NullProxy-accessing,  Prev: NullProxy class-instance creation,  Up: NullProxy

1.113.2 NullProxy: accessing
----------------------------

dumpTo: anObjectDumper
     Dump the object stored in the proxy to anObjectDumper



File: gst-base.info,  Node: NullValueHolder,  Next: Number,  Prev: NullProxy,  Up: Base classes

1.114 NullValueHolder
=====================

Defined in namespace Smalltalk
Superclass: ValueAdaptor
Category: Language-Data types
     I pretend to store my value in a variable, but I don't actually.
     You can use the only instance of my class (returned by
     `ValueHolder null') if you're not interested in a value that is
     returned as described in ValueHolder's comment.

* Menu:

* NullValueHolder class-creating instances::  (class)
* NullValueHolder-accessing::  (instance)


File: gst-base.info,  Node: NullValueHolder class-creating instances,  Next: NullValueHolder-accessing,  Up: NullValueHolder

1.114.1 NullValueHolder class: creating instances
-------------------------------------------------

new
     Not used - use `ValueHolder null' instead



File: gst-base.info,  Node: NullValueHolder-accessing,  Prev: NullValueHolder class-creating instances,  Up: NullValueHolder

1.114.2 NullValueHolder: accessing
----------------------------------

value
     Retrive the value of the receiver. Always answer nil

value: anObject
     Set the value of the receiver. Do nothing, discard the value



File: gst-base.info,  Node: Number,  Next: Object,  Prev: NullValueHolder,  Up: Base classes

1.115 Number
============

Defined in namespace Smalltalk
Superclass: Magnitude
Category: Language-Data types
     I am an abstract class that provides operations on numbers, both
     floating point and integer.  I provide some generic predicates,
     and supply the implicit type coercing code for binary operations.

* Menu:

* Number class-converting::  (class)
* Number class-testing::  (class)
* Number-arithmetic::  (instance)
* Number-comparing::  (instance)
* Number-converting::  (instance)
* Number-copying::  (instance)
* Number-error raising::  (instance)
* Number-misc math::  (instance)
* Number-point creation::  (instance)
* Number-retrying::  (instance)
* Number-shortcuts and iterators::  (instance)
* Number-testing::  (instance)
* Number-truncation and round off::  (instance)


File: gst-base.info,  Node: Number class-converting,  Next: Number class-testing,  Up: Number

1.115.1 Number class: converting
--------------------------------

coerce: aNumber
     Answer aNumber - whatever class it belongs to, it is good

readFrom: aStream
     Answer the number read from the rest of aStream, converted to an
     instance of the receiver. If the receiver is number, the class of
     the result is undefined - but the result is good.



File: gst-base.info,  Node: Number class-testing,  Next: Number-arithmetic,  Prev: Number class-converting,  Up: Number

1.115.2 Number class: testing
-----------------------------

isImmediate
     Answer whether, if x is an instance of the receiver, x copy == x



File: gst-base.info,  Node: Number-arithmetic,  Next: Number-comparing,  Prev: Number class-testing,  Up: Number

1.115.3 Number: arithmetic
--------------------------

* aNumber
     Subtract the receiver and aNumber, answer the result

+ aNumber
     Sum the receiver and aNumber, answer the result

- aNumber
     Subtract aNumber from the receiver, answer the result

/ aNumber
     Divide the receiver by aNumber, answer the result (no loss of
     precision).  Raise a ZeroDivide exception or return a valid
     (possibly infinite) continuation value if aNumber is zero.

// aNumber
     Return the integer quotient of dividing the receiver by aNumber
     with truncation towards negative infinity.  Raise a ZeroDivide
     exception if aNumber is zero

\\ aNumber
     Return the remainder of dividing the receiver by aNumber with
     truncation towards negative infinity.  Raise a ZeroDivide
     exception if aNumber is zero

quo: aNumber
     Return the integer quotient of dividing the receiver by aNumber
     with truncation towards zero.  Raise a ZeroDivide exception if
     aNumber is zero

reciprocal
     Return the reciprocal of the receiver

rem: aNumber
     Return the remainder of dividing the receiver by aNumber with
     truncation towards zero.  Raise a ZeroDivide exception if aNumber
     is zero



File: gst-base.info,  Node: Number-comparing,  Next: Number-converting,  Prev: Number-arithmetic,  Up: Number

1.115.4 Number: comparing
-------------------------

max: aNumber
     Answer the maximum between the receiver and aNumber.  Redefine in
     subclasses if necessary to ensure that if either self or aNumber
     is a NaN, it is always answered.

min: aNumber
     Answer the minimum between the receiver and aNumber.  Redefine in
     subclasses if necessary to ensure that if either self or aNumber
     is a NaN, it is always answered.



File: gst-base.info,  Node: Number-converting,  Next: Number-copying,  Prev: Number-comparing,  Up: Number

1.115.5 Number: converting
--------------------------

asFloat
     Convert the receiver to an arbitrary subclass of Float

asFloatD
     This method's functionality should be implemented by subclasses of
     Number

asFloatE
     This method's functionality should be implemented by subclasses of
     Number

asFloatQ
     This method's functionality should be implemented by subclasses of
     Number

asNumber
     Answer the receiver, since it is already a number

asRectangle
     Answer an empty rectangle whose origin is (self asPoint)

asScaledDecimal: n
     Answer the receiver, converted to a ScaledDecimal object.

asScaledDecimal: denDigits scale: n
     Answer the receiver, divided by 10^denDigits and converted to a
     ScaledDecimal object.

coerce: aNumber
     Answer aNumber - whatever class it belongs to, it is good

degreesToRadians
     Convert the receiver to radians

generality
     Answer the receiver's generality

radiansToDegrees
     Convert the receiver from radians to degrees

unity
     Coerce 1 to the receiver's class. The default implementation works,
     but is inefficient

zero
     Coerce 0 to the receiver's class. The default implementation works,
     but is inefficient



File: gst-base.info,  Node: Number-copying,  Next: Number-error raising,  Prev: Number-converting,  Up: Number

1.115.6 Number: copying
-----------------------

deepCopy
     Return the receiver - it's an immediate (immutable) object

shallowCopy
     Return the receiver - it's an immediate (immutable) object



File: gst-base.info,  Node: Number-error raising,  Next: Number-misc math,  Prev: Number-copying,  Up: Number

1.115.7 Number: error raising
-----------------------------

arithmeticError: msg
     Raise an ArithmeticError exception having msg as its message text.

zeroDivide
     Raise a division-by-zero (ZeroDivide) exception whose dividend is
     the receiver.



File: gst-base.info,  Node: Number-misc math,  Next: Number-point creation,  Prev: Number-error raising,  Up: Number

1.115.8 Number: misc math
-------------------------

abs
     Answer the absolute value of the receiver

arcCos
     Answer the arc cosine of the receiver

arcSin
     Answer the arc sine of the receiver

arcTan
     Answer the arc tangent of the receiver

arcTan: x
     Answer the angle (measured counterclockwise) between (x, self) and
     a ray starting in (0, 0) and moving towards (1, 0) - i.e. 3 o'clock

cos
     Answer the cosine of the receiver

estimatedLog
     Answer an estimate of (self abs floorLog: 10). This method should
     be overridden by subclasses, but Number's implementation does not
     raise errors - simply, it gives a correct result, so it is slow.

exp
     Answer e raised to the receiver

floorLog: radix
     Answer (self log: radix) floor. Optimized to answer an integer.

ln
     Answer log base e of the receiver

log
     Answer log base aNumber of the receiver

log: aNumber
     Answer log base aNumber of the receiver

negated
     Answer the negated of the receiver

positiveDifference: aNumber
     Answer the positive difference of the receiver and aNumber, that
     is self - aNumber if it is positive, 0 otherwise.

raisedTo: aNumber
     Return self raised to aNumber power

raisedToInteger: anInteger
     Return self raised to the anInteger-th power

sin
     Answer the sine of the receiver

sqrt
     Answer the square root of the receiver

squared
     Answer the square of the receiver

tan
     Answer the tangent of the receiver

withSignOf: aNumber
     Answer the receiver, with its sign possibly changed to match that
     of aNumber.



File: gst-base.info,  Node: Number-point creation,  Next: Number-retrying,  Prev: Number-misc math,  Up: Number

1.115.9 Number: point creation
------------------------------

@ y
     Answer a new point whose x is the receiver and whose y is y

asPoint
     Answer a new point, self @ self



File: gst-base.info,  Node: Number-retrying,  Next: Number-shortcuts and iterators,  Prev: Number-point creation,  Up: Number

1.115.10 Number: retrying
-------------------------

retry: aSymbol coercing: aNumber
     Coerce to the other number's class the one number between the
     receiver and aNumber which has the lowest, and retry calling
     aSymbol.  aSymbol is supposed not to be #= or #~= (since those
     don't fail if aNumber is not a Number).

retryDifferenceCoercing: aNumber
     Coerce to the other number's class the one number between the
     receiver and aNumber which has the lowest, and retry calling #-.

retryDivisionCoercing: aNumber
     Coerce to the other number's class the one number between the
     receiver and aNumber which has the lowest, and retry calling #/.

retryEqualityCoercing: aNumber
     Coerce to the other number's class the one number between the
     receiver and aNumber which has the lowest, and retry calling #=.

retryError
     Raise an error--a retrying method was called with two arguments
     having the same generality.

retryInequalityCoercing: aNumber
     Coerce to the other number's class the one number between the
     receiver and aNumber which has the lowest, and retry calling #~=.

retryMultiplicationCoercing: aNumber
     Coerce to the other number's class the one number between the
     receiver and aNumber which has the lowest, and retry calling #*.

retryRelationalOp: aSymbol coercing: aNumber
     Coerce to the other number's class the one number between the
     receiver and aNumber which has the lowest, and retry calling
     aSymbol (<, <=, >, >=).

retrySumCoercing: aNumber
     Coerce to the other number's class the one number between the
     receiver and aNumber which has the lowest, and retry calling #+.



File: gst-base.info,  Node: Number-shortcuts and iterators,  Next: Number-testing,  Prev: Number-retrying,  Up: Number

1.115.11 Number: shortcuts and iterators
----------------------------------------

to: stop
     Return an interval going from the receiver to stop by 1

to: stop by: step
     Return an interval going from the receiver to stop with the given
     step

to: stop by: step do: aBlock
     Evaluate aBlock for each value in the interval going from the
     receiver to stop with the given step. Compiled in-line for integer
     literal steps, and for one-argument aBlocks without temporaries,
     and therefore not overridable.

to: stop do: aBlock
     Evaluate aBlock for each value in the interval going from the
     receiver to stop by 1. Compiled in-line for one-argument aBlocks
     without temporaries, and therefore not overridable.



File: gst-base.info,  Node: Number-testing,  Next: Number-truncation and round off,  Prev: Number-shortcuts and iterators,  Up: Number

1.115.12 Number: testing
------------------------

closeTo: num
     Answer whether the receiver can be considered sufficiently close
     to num (this is done by checking equality if num is not a number,
     and by checking with 0.01% tolerance if num is a number).

even
     Returns true if self is divisible by 2

isFinite
     Answer whether the receiver represents a finite quantity.  Most
     numeric classes are for finite quantities, so the default is to
     answer true rather than calling #subclassResponsibility.

isInfinite
     Answer whether the receiver represents an infinite quantity.  Most
     numeric classes are for finite quantities, so the default is to
     answer false rather than calling #subclassResponsibility.

isNaN
     Answer whether the receiver is a Not-A-Number.  Most numeric
     classes don't handle nans, so the default is to answer false
     rather than calling #subclassResponsibility.

isNumber
     Answer `true'.

isRational
     Answer whether the receiver is rational - false by default

negative
     Answer whether the receiver is < 0

odd
     Returns true if self is not divisible by 2

positive
     Answer whether the receiver is >= 0

sign
     Returns the sign of the receiver.

strictlyPositive
     Answer whether the receiver is > 0



File: gst-base.info,  Node: Number-truncation and round off,  Prev: Number-testing,  Up: Number

1.115.13 Number: truncation and round off
-----------------------------------------

asInteger
     Answer the receiver, rounded to the nearest integer

floor
     Return the integer nearest the receiver toward negative infinity.

fractionPart
     Answer a number which, summed to the #integerPart of the receiver,
     gives the receiver itself.

integerPart
     Answer the receiver, truncated towards zero

rounded
     Returns the integer nearest the receiver

roundTo: aNumber
     Answer the receiver, truncated to the nearest multiple of aNumber

truncated
     Answer the receiver, truncated towards zero

truncateTo: aNumber
     Answer the receiver, truncated towards zero to a multiple of
     aNumber



File: gst-base.info,  Node: Object,  Next: ObjectDumper,  Prev: Number,  Up: Base classes

1.116 Object
============

Defined in namespace Smalltalk
Superclass: none
Category: Language-Implementation
     I am the root of the Smalltalk class system.  All classes in the
     system are subclasses of me.

* Menu:

* Object class-initialization::  (class)
* Object-built ins::  (instance)
* Object-change and update::  (instance)
* Object-class type methods::  (instance)
* Object-conversion::  (instance)
* Object-copying::  (instance)
* Object-debugging::  (instance)
* Object-dependents access::  (instance)
* Object-error raising::  (instance)
* Object-finalization::  (instance)
* Object-printing::  (instance)
* Object-relational operators::  (instance)
* Object-saving and loading::  (instance)
* Object-storing::  (instance)
* Object-syntax shortcuts::  (instance)
* Object-testing functionality::  (instance)
* Object-VM callbacks::  (instance)


File: gst-base.info,  Node: Object class-initialization,  Next: Object-built ins,  Up: Object

1.116.1 Object class: initialization
------------------------------------

dependencies
     Answer a dictionary that associates an object with its dependents.

dependencies: anObject
     Use anObject as the dictionary that associates an object with its
     dependents.

finalizableObjects
     Answer a set of finalizable objects.

initialize
     Initialize the Dependencies dictionary to be an
     IdentityDictionary.  In a later phase of the bootstrap process
     this is changed to be a WeakKeyIdentityDictionary.

update: aspect
     Do any global tasks for the ObjectMemory events.



File: gst-base.info,  Node: Object-built ins,  Next: Object-change and update,  Prev: Object class-initialization,  Up: Object

1.116.2 Object: built ins
-------------------------

= arg
     Answer whether the receiver is equal to arg. The equality test is
     by default the same as that for identical objects. = must not fail;
     answer false if the receiver cannot be compared to arg

== arg
     Answer whether the receiver is the same object as arg. This is a
     very fast test and is called 'object identity'.

allOwners
     Return an Array of Objects that point to the receiver.

asOop
     Answer the object index associated to the receiver. The object
     index doesn't change when garbage collection is performed.

at: anIndex
     Answer the index-th indexed instance variable of the receiver

at: anIndex put: value
     Store value in the index-th indexed instance variable of the
     receiver

basicAt: anIndex
     Answer the index-th indexed instance variable of the receiver.
     This method must not be overridden, override at: instead

basicAt: anIndex put: value
     Store value in the index-th indexed instance variable of the
     receiver This method must not be overridden, override at:put:
     instead

basicPrint
     Print a basic representation of the receiver

basicSize
     Answer the number of indexed instance variable in the receiver

become: otherObject
     Change all references to the receiver into references to
     otherObject.  Depending on the implementation, references to
     otherObject might or might not be transformed into the receiver
     (respectively, 'two-way become' and 'one-way become').
     Implementations doing one-way become answer the receiver (so that
     it is not lost). Most implementations doing two-way become answer
     otherObject, but this is not assured - so do answer the receiver
     for consistency.  GNU Smalltalk does two-way become and answers
     otherObject, but this might change in future versions: programs
     should not rely on the behavior and results of #become: .

changeClassTo: aBehavior
     Mutate the class of the receiver to be aBehavior.  Note: Tacitly
     assumes that the structure is the same for the original and new
     class!!

checkIndexableBounds: index
     Private - Check the reason why an access to the given indexed
     instance variable failed

checkIndexableBounds: index put: object
     Private - Check the reason why a store to the given indexed
     instance variable failed

class
     Answer the class to which the receiver belongs

"### look
     Not commented.

hash
     Answer an hash value for the receiver. This hash value is ok for
     objects that do not redefine ==.

identityHash
     Answer an hash value for the receiver. This method must not be
     overridden

instVarAt: index
     Answer the index-th instance variable of the receiver.  This
     method must not be overridden.

instVarAt: index put: value
     Store value in the index-th instance variable of the receiver.
     This method must not be overridden.

isReadOnly
     Answer whether the object's indexed instance variables can be
     written

isUntrusted
     Answer whether the object is to be considered untrusted.

makeEphemeron
     Make the object an 'ephemeron'.  An ephemeron is marked after all
     other objects, and if no references are found to the key except
     from the object itself, it is sent the #mourn message.

makeFixed
     Avoid that the receiver moves in memory across garbage collections.

makeReadOnly: aBoolean
     Set whether the object's indexed instance variables can be written

makeUntrusted: aBoolean
     Set whether the object is to be considered untrusted.

makeWeak
     Make the object a 'weak' one. When an object is only referenced by
     weak objects, it is collected and the slots in the weak objects
     are changed to nils by the VM; the weak object is then sent the
     #mourn message.

mark: aSymbol
     Private - use this method to mark code which needs to be reworked,
     removed, etc. You can then find all senders of #mark: to find all
     marked methods or you can look for all senders of the symbol that
     you sent to #mark: to find a category of marked methods.

nextInstance
     Private - answer another instance of the receiver's class, or nil
     if the entire object table has been walked

notYetImplemented
     Called when a method defined by a class is not yet implemented,
     but is going to be

perform: selectorOrMessageOrMethod
     Send the unary message named selectorOrMessageOrMethod (if a
     Symbol) to the receiver, or the message and arguments it
     identifies (if a Message or DirectedMessage), or finally execute
     the method within the receiver (if a CompiledMethod).  In the last
     case, the method need not reside on the hierarchy from the
     receiver's class to Object - it need not reside at all in a
     MethodDictionary, in fact - but doing bad things will compromise
     stability of the Smalltalk virtual machine (and don't blame
     anybody but yourself).  This method should not be overridden

perform: selectorOrMethod with: arg1
     Send the message named selectorOrMethod (if a Symbol) to the
     receiver, passing arg1 to it, or execute the method within the
     receiver (if a CompiledMethod).  In the latter case, the method
     need not reside on the hierarchy from the receiver's class to
     Object - it need not reside at all in a MethodDictionary, in fact
     - but doing bad things will compromise stability of the Smalltalk
     virtual machine (and don't blame anybody but yourself).  This
     method should not be overridden

perform: selectorOrMethod with: arg1 with: arg2
     Send the message named selectorOrMethod (if a Symbol) to the
     receiver, passing arg1 and arg2 to it, or execute the method
     within the receiver (if a CompiledMethod).  In the latter case,
     the method need not reside on the hierarchy from the receiver's
     class to Object - it need not reside at all in a MethodDictionary,
     in fact - but doing bad things will compromise stability of the
     Smalltalk virtual machine (and don't blame anybody but yourself).
     This method should not be overridden

perform: selectorOrMethod with: arg1 with: arg2 with: arg3
     Send the message named selectorOrMethod (if a Symbol) to the
     receiver, passing the other arguments to it, or execute the method
     within the receiver (if a CompiledMethod).  In the latter case,
     the method need not reside on the hierarchy from the receiver's
     class to Object - it need not reside at all in a MethodDictionary,
     in fact - but doing bad things will compromise stability of the
     Smalltalk virtual machine (and don't blame anybody but yourself).
     This method should not be overridden

perform: selectorOrMethod with: arg1 with: arg2 with: arg3 with: arg4
     Send the message named selectorOrMethod (if a Symbol) to the
     receiver, passing the other arguments to it, or execute the method
     within the receiver (if a CompiledMethod).  In the latter case,
     the method need not reside on the hierarchy from the receiver's
     class to Object - it need not reside at all in a MethodDictionary,
     in fact - but doing bad things will compromise stability of the
     Smalltalk virtual machine (and don't blame anybody but yourself).
     This method should not be overridden

perform: selectorOrMethod withArguments: argumentsArray
     Send the message named selectorOrMethod (if a Symbol) to the
     receiver, passing the elements of argumentsArray as parameters, or
     execute the method within the receiver (if a CompiledMethod).  In
     the latter case, the method need not reside on the hierarchy from
     the receiver's class to Object - it need not reside at all in a
     MethodDictionary, in fact - but doing bad things will compromise
     stability of the Smalltalk virtual machine (and don't blame
     anybody but yourself).  This method should not be overridden

primError: message
     This might start the debugger... Note that we use #basicPrint
     'cause #printOn: might invoke an error.

primitiveFailed
     Called when a VM primitive fails

shallowCopy
     Returns a shallow copy of the receiver (the instance variables are
     not copied)

shouldNotImplement
     Called when objects belonging to a class should not answer a
     selector defined by a superclass

size
     Answer the number of indexed instance variable in the receiver

subclassResponsibility
     Called when a method defined by a class should be overridden in a
     subclass

tenure
     Move the object to oldspace.



File: gst-base.info,  Node: Object-change and update,  Next: Object-class type methods,  Prev: Object-built ins,  Up: Object

1.116.3 Object: change and update
---------------------------------

broadcast: aSymbol
     Send the unary message aSymbol to each of the receiver's dependents

broadcast: aSymbol with: anObject
     Send the message aSymbol to each of the receiver's dependents,
     passing anObject

broadcast: aSymbol with: arg1 with: arg2
     Send the message aSymbol to each of the receiver's dependents,
     passing arg1 and arg2 as parameters

broadcast: aSymbol withArguments: anArray
     Send the message aSymbol to each of the receiver's dependents,
     passing the parameters in anArray

broadcast: aSymbol withBlock: aBlock
     Send the message aSymbol to each of the receiver's dependents,
     passing the result of evaluating aBlock with each dependent as the
     parameter

changed
     Send update: for each of the receiver's dependents, passing them
     the receiver

changed: aParameter
     Send update: for each of the receiver's dependents, passing them
     aParameter

update: aParameter
     Default behavior is to do nothing. Called by #changed and #changed:



File: gst-base.info,  Node: Object-class type methods,  Next: Object-conversion,  Prev: Object-change and update,  Up: Object

1.116.4 Object: class type methods
----------------------------------

species
     This method has no unique definition. Generally speaking, methods
     which always return the same type usually don't use #class, but
     #species.  For example, a PositionableStream's species is the
     class of the collection on which it is streaming (used by upTo:,
     upToAll:, upToEnd). Stream uses species for obtaining the class of
     next:'s return value, Collection uses it in its #copyEmpty:
     message, which in turn is used by all collection-re- turning
     methods. An Interval's species is Array (used by collect:, select:,
     reject:, etc.).

yourself
     Answer the receiver



File: gst-base.info,  Node: Object-conversion,  Next: Object-copying,  Prev: Object-class type methods,  Up: Object

1.116.5 Object: conversion
--------------------------

asValue
     Answer a ValueHolder whose initial value is the receiver.



File: gst-base.info,  Node: Object-copying,  Next: Object-debugging,  Prev: Object-conversion,  Up: Object

1.116.6 Object: copying
-----------------------

copy
     Returns a shallow copy of the receiver (the instance variables are
     not copied). The shallow copy receives the message postCopy and the
     result of postCopy is passed back.

deepCopy
     Returns a deep copy of the receiver (the instance variables are
     copies of the receiver's instance variables)

postCopy
     Performs any changes required to do on a copied object. This is the
     place where one could, for example, put code to replace objects
     with copies of the objects



File: gst-base.info,  Node: Object-debugging,  Next: Object-dependents access,  Prev: Object-copying,  Up: Object

1.116.7 Object: debugging
-------------------------

breakpoint: context return: return
     Called back by the system. Must return the value passed through the
     second parameter

inspect
     Print all the instance variables of the receiver on the Transcript

validSize
     Answer how many elements in the receiver should be inspected



File: gst-base.info,  Node: Object-dependents access,  Next: Object-error raising,  Prev: Object-debugging,  Up: Object

1.116.8 Object: dependents access
---------------------------------

addDependent: anObject
     Add anObject to the set of the receiver's dependents. Important:
     if an object has dependents, it won't be garbage collected.

dependents
     Answer a collection of the receiver's dependents.

release
     Remove all of the receiver's dependents from the set and allow the
     receiver to be garbage collected.

removeDependent: anObject
     Remove anObject to the set of the receiver's dependents. No problem
     if anObject is not in the set of the receiver's dependents.



File: gst-base.info,  Node: Object-error raising,  Next: Object-finalization,  Prev: Object-dependents access,  Up: Object

1.116.9 Object: error raising
-----------------------------

doesNotUnderstand: aMessage
     Called by the system when a selector was not found. message is a
     Message containing information on the receiver

error: message
     Display a walkback for the receiver, with the given error message.
     Signal an `Error' exception (you can trap it the old way too, with
     `ExError'

halt: message
     Display a walkback for the receiver, with the given error message.
     Signal an `Halt' exception (you can trap it the old way too, with
     `ExHalt')



File: gst-base.info,  Node: Object-finalization,  Next: Object-printing,  Prev: Object-error raising,  Up: Object

1.116.10 Object: finalization
-----------------------------

addToBeFinalized
     Arrange things so that #finalize is sent to the object when the
     garbage collector finds out there are only weak references to it.

finalize
     Do nothing by default

mourn
     This method is sent by the VM to weak and ephemeron objects when
     one of their fields is found out to be garbage collectable (this
     means, for weak objects, that there are no references to it from
     non-weak objects, and for ephemeron objects, that the only paths
     to the first instance variable pass through other instance
     variables of the same ephemeron).  The default behavior is to do
     nothing.

removeToBeFinalized
     Unregister the object, so that #finalize is no longer sent to the
     object when the garbage collector finds out there are only weak
     references to it.



File: gst-base.info,  Node: Object-printing,  Next: Object-relational operators,  Prev: Object-finalization,  Up: Object

1.116.11 Object: printing
-------------------------

basicPrintNl
     Print a basic representation of the receiver, followed by a new
     line.

basicPrintOn: aStream
     Print a represention of the receiver on aStream

     representation

display
     Print a represention of the receiver on the Transcript (stdout the
     GUI is not active). For most objects this is simply its #print
     representation, but for strings and characters, superfluous dollars
     or extra pair of quotes are stripped.

displayNl
     Print a represention of the receiver, then put a new line on the
     Transcript (stdout the GUI is not active). For most objects this
     is simply its #printNl representation, but for strings and
     characters, superfluous dollars or extra pair of quotes are
     stripped.

displayOn: aStream
     Print a represention of the receiver on aStream. For most objects
     this is simply its #printOn: representation, but for strings and
     characters, superfluous dollars or extra pair of quotes are
     stripped.

displayString
     Answer a String representing the receiver. For most objects this
     is simply its #printString, but for strings and characters,
     superfluous dollars or extra pair of quotes are stripped.

print
     Print a represention of the receiver on the Transcript (stdout the
     GUI is not active)

printNl
     Print a represention of the receiver on stdout, put a new line the
     Transcript (stdout the GUI is not active)

printOn: aStream
     Print a represention of the receiver on aStream

printString
     Answer a String representing the receiver



File: gst-base.info,  Node: Object-relational operators,  Next: Object-saving and loading,  Prev: Object-printing,  Up: Object

1.116.12 Object: relational operators
-------------------------------------

~= anObject
     Answer whether the receiver and anObject are not equal

~~ anObject
     Answer whether the receiver and anObject are not the same object



File: gst-base.info,  Node: Object-saving and loading,  Next: Object-storing,  Prev: Object-relational operators,  Up: Object

1.116.13 Object: saving and loading
-----------------------------------

binaryRepresentationObject
     This method must be implemented if PluggableProxies are used with
     the receiver's class.  The default implementation raises an
     exception.

postLoad
     Called after loading an object; must restore it to the state before
     `preStore' was called.  Do nothing by default

postStore
     Called after an object is dumped; must restore it to the state
     before `preStore' was called.  Call #postLoad by default

preStore
     Called before dumping an object; it must *change* it (it must not
     answer a new object) if necessary.  Do nothing by default

reconstructOriginalObject
     Used if an instance of the receiver's class is returned as the
     #binaryRepresentationObject of another object.  The default
     implementation raises an exception.



File: gst-base.info,  Node: Object-storing,  Next: Object-syntax shortcuts,  Prev: Object-saving and loading,  Up: Object

1.116.14 Object: storing
------------------------

store
     Put a String of Smalltalk code compiling to the receiver on the
     Transcript (stdout the GUI is not active)

storeNl
     Put a String of Smalltalk code compiling to the receiver, followed
     by a new line, on the Transcript (stdout the GUI is not active)

storeOn: aStream
     Put Smalltalk code compiling to the receiver on aStream

storeString
     Answer a String of Smalltalk code compiling to the receiver



File: gst-base.info,  Node: Object-syntax shortcuts,  Next: Object-testing functionality,  Prev: Object-storing,  Up: Object

1.116.15 Object: syntax shortcuts
---------------------------------

-> anObject
     Creates a new instance of Association with the receiver being the
     key and the argument becoming the value



File: gst-base.info,  Node: Object-testing functionality,  Next: Object-VM callbacks,  Prev: Object-syntax shortcuts,  Up: Object

1.116.16 Object: testing functionality
--------------------------------------

ifNil: nilBlock
     Evaluate nilBlock if the receiver is nil, else answer self

ifNil: nilBlock ifNotNil: notNilBlock
     Evaluate nilBlock if the receiver is nil, else evaluate
     notNilBlock, passing the receiver.

ifNotNil: notNilBlock
     Evaluate notNiilBlock if the receiver is not nil, passing the
     receiver.  Else answer nil.

ifNotNil: notNilBlock ifNil: nilBlock
     Evaluate nilBlock if the receiver is nil, else evaluate
     notNilBlock, passing the receiver.

isArray
     Answer `false'.

isBehavior
     Answer `false'.

isCharacter
     Answer `false'.

isCharacterArray
     Answer `false'.

isClass
     Answer `false'.

isFloat
     Answer `false'.

isInteger
     Answer `false'.

isKindOf: aClass
     Answer whether the receiver's class is aClass or a subclass of
     aClass

isMemberOf: aClass
     Returns true if the receiver is an instance of the class 'aClass'

isMeta
     Same as isMetaclass

isMetaClass
     Same as isMetaclass

isMetaclass
     Answer `false'.

isNamespace
     Answer `false'.

isNil
     Answer whether the receiver is nil

isNumber
     Answer `false'.

isSmallInteger
     Answer `false'.

isString
     Answer `false'.

isSymbol
     Answer `false'.

notNil
     Answer whether the receiver is not nil

respondsTo: aSymbol
     Returns true if the receiver understands the given selector



File: gst-base.info,  Node: Object-VM callbacks,  Prev: Object-testing functionality,  Up: Object

1.116.17 Object: VM callbacks
-----------------------------

badReturnError
     Called back when a block performs a bad return.

mustBeBoolean
     Called by the system when ifTrue:*, ifFalse:*, and: or or: are
     sent to anything but a boolean

noRunnableProcess
     Called back when all processes are suspended

userInterrupt
     Called back when the user presses Ctrl-Break



File: gst-base.info,  Node: ObjectDumper,  Next: ObjectMemory,  Prev: Object,  Up: Base classes

1.117 ObjectDumper
==================

Defined in namespace Smalltalk
Superclass: Stream
Category: Streams-Files
     I'm not part of a normal Smalltalk system, but most Smalltalks
     provide a similar feature: that is, support for storing objects in
     a binary format; there are many advantages in using me instead of
     #storeOn: and the Smalltalk compiler.

     The data is stored in a very compact format, which has the side
     effect of making loading much faster when compared with compiling
     the Smalltalk code prepared by #storeOn:.  In addition, my
     instances support circular references between objects, while
     #storeOn: supports it only if you know of such references at
     design time and you override #storeOn: to deal with them

* Menu:

* ObjectDumper class-establishing proxy classes::  (class)
* ObjectDumper class-instance creation::  (class)
* ObjectDumper class-shortcuts::  (class)
* ObjectDumper class-testing::  (class)
* ObjectDumper-accessing::  (instance)
* ObjectDumper-loading/dumping objects::  (instance)
* ObjectDumper-stream interface::  (instance)


File: gst-base.info,  Node: ObjectDumper class-establishing proxy classes,  Next: ObjectDumper class-instance creation,  Up: ObjectDumper

1.117.1 ObjectDumper class: establishing proxy classes
------------------------------------------------------

disableProxyFor: aClass
     Disable proxies for instances of aClass and its descendants

hasProxyFor: aClass
     Answer whether a proxy class has been registered for instances of
     aClass.

proxyClassFor: anObject
     Answer the class of a valid proxy for an object, or nil if none
     could be found

proxyFor: anObject
     Answer a valid proxy for an object, or the object itself if none
     could be found

registerProxyClass: aProxyClass for: aClass
     Register the proxy class aProxyClass - descendent of DumperProxy -
     to be used for instances of aClass and its descendants



File: gst-base.info,  Node: ObjectDumper class-instance creation,  Next: ObjectDumper class-shortcuts,  Prev: ObjectDumper class-establishing proxy classes,  Up: ObjectDumper

1.117.2 ObjectDumper class: instance creation
---------------------------------------------

new
     This method should not be called for instances of this class.

on: aFileStream
     Answer an ObjectDumper working on aFileStream.



File: gst-base.info,  Node: ObjectDumper class-shortcuts,  Next: ObjectDumper class-testing,  Prev: ObjectDumper class-instance creation,  Up: ObjectDumper

1.117.3 ObjectDumper class: shortcuts
-------------------------------------

dump: anObject to: aFileStream
     Dump anObject to aFileStream. Answer anObject

loadFrom: aFileStream
     Load an object from aFileStream and answer it



File: gst-base.info,  Node: ObjectDumper class-testing,  Next: ObjectDumper-accessing,  Prev: ObjectDumper class-shortcuts,  Up: ObjectDumper

1.117.4 ObjectDumper class: testing
-----------------------------------

example
     This is a real torture test: it outputs recursive objects,
     identical objects multiple times, classes, metaclasses, integers,
     characters and proxies (which is also a test of more complex
     objects)!



File: gst-base.info,  Node: ObjectDumper-accessing,  Next: ObjectDumper-loading/dumping objects,  Prev: ObjectDumper class-testing,  Up: ObjectDumper

1.117.5 ObjectDumper: accessing
-------------------------------

flush
     `Forget' any information on previously stored objects.

stream
     Answer the ByteStream to which the ObjectDumper will write and
     from which it will read.

stream: aByteStream
     Set the ByteStream to which the ObjectDumper will write and from
     which it will read.



File: gst-base.info,  Node: ObjectDumper-loading/dumping objects,  Next: ObjectDumper-stream interface,  Prev: ObjectDumper-accessing,  Up: ObjectDumper

1.117.6 ObjectDumper: loading/dumping objects
---------------------------------------------

dump: anObject
     Dump anObject on the stream associated with the receiver. Answer
     anObject

load
     Load an object from the stream associated with the receiver and
     answer it



File: gst-base.info,  Node: ObjectDumper-stream interface,  Prev: ObjectDumper-loading/dumping objects,  Up: ObjectDumper

1.117.7 ObjectDumper: stream interface
--------------------------------------

atEnd
     Answer whether the underlying stream is at EOF

next
     Load an object from the underlying stream

nextPut: anObject
     Store an object on the underlying stream



File: gst-base.info,  Node: ObjectMemory,  Next: OrderedCollection,  Prev: ObjectDumper,  Up: Base classes

1.118 ObjectMemory
==================

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Implementation
     I provide a few methods that enable one to tune the virtual
     machine's usage of memory.  In addition, I can signal to my
     dependants some `events' that can happen during the virtual
     machine's life.

     ObjectMemory has both class-side and instance-side methods.  In
     general, class-side methods provide means to tune the parameters
     of the memory manager, while instance-side methods are used
     together with the #current class-side method to take a look at
     statistics on the memory manager's state.

* Menu:

* ObjectMemory class-accessing::  (class)
* ObjectMemory class-builtins::  (class)
* ObjectMemory class-initialization::  (class)
* ObjectMemory class-saving the image::  (class)
* ObjectMemory-accessing::  (instance)
* ObjectMemory-builtins::  (instance)
* ObjectMemory-derived information::  (instance)


File: gst-base.info,  Node: ObjectMemory class-accessing,  Next: ObjectMemory class-builtins,  Up: ObjectMemory

1.118.1 ObjectMemory class: accessing
-------------------------------------

current
     Return a snapshot of the VM's memory management statistics.



File: gst-base.info,  Node: ObjectMemory class-builtins,  Next: ObjectMemory class-initialization,  Prev: ObjectMemory class-accessing,  Up: ObjectMemory

1.118.2 ObjectMemory class: builtins
------------------------------------

abort
     Quit the Smalltalk environment, dumping core.

addressOf: anObject
     Returns the address of the actual object that anObject references.
     Note that, with the exception of fixed objects this address is
     only valid until the next garbage collection; thus it's pretty
     risky to count on the address returned by this method for very
     long.

addressOfOOP: anObject
     Returns the address of the OOP (object table slot) for anObject.
     The address is an Integer and will not change over time (i.e. is
     immune from garbage collector action) except if the virtual machine
     is stopped and restarted.

bigObjectThreshold
     Answer the smallest size for objects that are allocated outside
     the main heap in the hope of providing more locality of reference
     between small objects.

bigObjectThreshold: bytes
     Set the smallest size for objects that are allocated outside the
     main heap in the hope of providing more locality of reference
     between small objects.  bytes must be a positive SmallInteger.

compact
     Force a full garbage collection, including compaction of oldspace

finishIncrementalGC
     Do a step in the incremental garbage collection.

gcMessage
     Answer whether messages indicating that garbage collection is
     taking place are printed on stdout

gcMessage: aBoolean
     Set whether messages indicating that garbage collection is taking
     place are printed on stdout

globalGarbageCollect
     Force a full garbage collection

growThresholdPercent
     Answer the percentage of the amount of memory used by the system
     grows which has to be full for the system to allocate more memory

growThresholdPercent: growPercent
     Set the percentage of the amount of memory used by the system grows
     which has to be full for the system to allocate more memory

growTo: numBytes
     Grow the amount of memory used by the system grows to numBytes.

incrementalGCStep
     Do a step in the incremental garbage collection.

quit
     Quit the Smalltalk environment. Whether files are closed and other
     similar cleanup occurs depends on the platform

quit: exitStatus
     Quit the Smalltalk environment, passing the exitStatus integer to
     the OS. Files are closed and other similar cleanups occur.

scavenge
     Force a minor garbage collection

smoothingFactor
     Answer the factor (between 0 and 1) used to smooth the statistics
     provided by the virtual machine about memory handling.  0 disables
     updating the averages, 1 disables the smoothing (the statistics
     return the last value).

smoothingFactor: rate
     Set the factor (between 0 and 1) used to smooth the statistics
     provided by the virtual machine about memory handling.  0 disables
     updating the averages, 1 disables the smoothing (the statistics
     return the last value).

snapshot: aString
     Save an image on the aString file

spaceGrowRate
     Answer the rate with which the amount of memory used by the system
     grows

spaceGrowRate: rate
     Set the rate with which the amount of memory used by the system
     grows



File: gst-base.info,  Node: ObjectMemory class-initialization,  Next: ObjectMemory class-saving the image,  Prev: ObjectMemory class-builtins,  Up: ObjectMemory

1.118.3 ObjectMemory class: initialization
------------------------------------------

initialize
     Initialize the globals



File: gst-base.info,  Node: ObjectMemory class-saving the image,  Next: ObjectMemory-accessing,  Prev: ObjectMemory class-initialization,  Up: ObjectMemory

1.118.4 ObjectMemory class: saving the image
--------------------------------------------

snapshot
     Save a snapshot on the image file that was loaded on startup.



File: gst-base.info,  Node: ObjectMemory-accessing,  Next: ObjectMemory-builtins,  Prev: ObjectMemory class-saving the image,  Up: ObjectMemory

1.118.5 ObjectMemory: accessing
-------------------------------

allocFailures
     Answer the number of times that the old-space allocator found no
     block that was at least as big as requested, and had to ask the
     operating system for more memory.

allocMatches
     Answer the number of times that the old-space allocator found a
     block that was exactly as big as requested.

allocProbes
     Answer the number of free blocks that the old-space allocator had
     to examine so far to allocate all the objects that are in old-space

allocSplits
     Answer the number of times that the old-space allocator could not
     find a block that was exactly as big as requested, and had to split
     a larger free block in two parts.

bytesPerOOP
     Answer the number of bytes that is taken by an ordinary object
     pointer (in practice, a field such as a named instance variable).

bytesPerOTE
     Answer the number of bytes that is taken by an object table entry
     (in practice, the overhead incurred by every object in the system,
     with the sole exception of SmallIntegers).

edenSize
     Answer the number of bytes in the `eden' area of the young
     generation (in practice, the number of allocated bytes between two
     scavenges).

edenUsedBytes
     Answer the number of bytes that are currently filled in the `eden'
     area of the young generation.

fixedSpaceSize
     Answer the number of bytes in the special heap devoted to objects
     that the garbage collector cannot move around in memory.

fixedSpaceUsedBytes
     Answer the number of bytes that are currently filled in the
     special heap devoted to objects that the garbage collector cannot
     move around in memory.

numCompactions
     Answer the number of oldspace compactions that happened since the
     VM was started.

numFixedOOPs
     Answer the number of objects that the garbage collector cannot
     move around in memory.

numFreeOTEs
     Answer the number of entries that are currently free in the object
     table.

numGlobalGCs
     Answer the number of global garbage collections (collection of the
     entire heap) that happened since the VM was started.

numGrowths
     Answer the number of times that oldspace was grown since the VM
     was started.

numOldOOPs
     Answer the number of objects that reside in the old generation.

numOTEs
     Answer the number of entries that are currently allocated for the
     object table.

numScavenges
     Answer the number of scavenges (fast collections of the young
     generation) that happened since the VM was started.

numWeakOOPs
     Answer the number of weak objects that the garbage collector is
     currently tracking.

oldSpaceSize
     Answer the number of bytes in the old generation.

oldSpaceUsedBytes
     Answer the number of bytes that are currently filled in the old
     generation.

reclaimedBytesPerGlobalGC
     Answer the average number of bytes that are found to be garbage
     during a global garbage collections.

reclaimedBytesPerScavenge
     Answer the average number of bytes that are found to be garbage
     during a scavenge.

reclaimedPercentPerScavenge
     Answer the average percentage of allocated bytes that are found to
     be garbage during a scavenge.  If this number falls below 60-70
     you should definitely increment the size of the eden, because you
     risk that scavenging is eating a considerable fraction of your
     execution time; do the measurement on a restarted image, so that
     the extra tenuring incurred when creating long-lived objects such
     as classes or methods is not considered.

survSpaceSize
     Answer the number of bytes in the `survivor' area of the young
     generation (the area to which young objects are relocated during
     scavenges).

survSpaceUsedBytes
     Answer the number of bytes that are currently filled in the
     `survivor' area of the young generation.

tenuredBytesPerScavenge
     Answer the average number of bytes that are promoted to oldspace
     during a scavenge.

timeBetweenGlobalGCs
     Answer the average number of milliseconds between two global
     garbage collections.

timeBetweenGrowths
     Answer the average number of milliseconds between decisions to
     grow the heap.

timeBetweenScavenges
     Answer the average number of milliseconds between two scavenges
     (fast collections of the young generation).

timeToCollect
     Answer the average number of milliseconds that a global garbage
     collection takes.

timeToCompact
     Answer the average number of milliseconds that compacting the heap
     takes.  This the same time that is taken by growing the heap.

timeToScavenge
     Answer the average number of milliseconds that a scavenge takes
     (fast collections of the young generation).



File: gst-base.info,  Node: ObjectMemory-builtins,  Next: ObjectMemory-derived information,  Prev: ObjectMemory-accessing,  Up: ObjectMemory

1.118.6 ObjectMemory: builtins
------------------------------

update
     Update the values in the object to the current state of the VM.



File: gst-base.info,  Node: ObjectMemory-derived information,  Prev: ObjectMemory-builtins,  Up: ObjectMemory

1.118.7 ObjectMemory: derived information
-----------------------------------------

scavengesBeforeTenuring
     Answer the number of scavenges that an object must on average
     survive before being promoted to oldspace; this is however only an
     estimate because objects that are reachable from oldspace have a
     higher probability to be tenured soon, while objects that are only
     reachable from thisContext have a lower probability to be tenured.
     Anyway, if this number falls below 2-3 you should definitely
     increment the size of eden and/or of survivor space, because you
     are tenuring too often and relying too much on global garbage
     collection to keep your heap clean; do the measurement on a
     restarted image, so that the extra tenuring incurred when creating
     long-lived objects such as classes or methods is not considered.



File: gst-base.info,  Node: OrderedCollection,  Next: Package,  Prev: ObjectMemory,  Up: Base classes

1.119 OrderedCollection
=======================

Defined in namespace Smalltalk
Superclass: SequenceableCollection
Category: Collections-Sequenceable
     My instances represent ordered collections of arbitrary typed
     objects which are not directly accessible by an index.  They can
     be accessed indirectly through an index, and can be manipulated by
     adding to the end or based on content (such as add:after:)

* Menu:

* OrderedCollection class-instance creation::  (class)
* OrderedCollection-accessing::  (instance)
* OrderedCollection-adding::  (instance)
* OrderedCollection-removing::  (instance)


File: gst-base.info,  Node: OrderedCollection class-instance creation,  Next: OrderedCollection-accessing,  Up: OrderedCollection

1.119.1 OrderedCollection class: instance creation
--------------------------------------------------

new
     Answer an OrderedCollection of default size

new: anInteger
     Answer an OrderedCollection of size anInteger



File: gst-base.info,  Node: OrderedCollection-accessing,  Next: OrderedCollection-adding,  Prev: OrderedCollection class-instance creation,  Up: OrderedCollection

1.119.2 OrderedCollection: accessing
------------------------------------

at: anIndex
     Answer the anIndex-th item of the receiver

at: anIndex put: anObject
     Store anObject at the anIndex-th item of the receiver, answer
     anObject

size
     Return the number of objects in the receiver



File: gst-base.info,  Node: OrderedCollection-adding,  Next: OrderedCollection-removing,  Prev: OrderedCollection-accessing,  Up: OrderedCollection

1.119.3 OrderedCollection: adding
---------------------------------

add: anObject
     Add anObject in the receiver, answer it

add: newObject after: oldObject
     Add newObject in the receiver just after oldObject, answer it.
     Fail if oldObject can't be found

add: newObject afterIndex: i
     Add newObject in the receiver just after the i-th, answer it.
     Fail if i < 0 or i > self size

add: newObject before: oldObject
     Add newObject in the receiver just before oldObject, answer it.
     Fail if oldObject can't be found

add: newObject beforeIndex: i
     Add newObject in the receiver just before the i-th, answer it.
     Fail if i < 1 or i > self size + 1

addAll: aCollection
     Add every item of aCollection to the receiver, answer it

addAll: newCollection after: oldObject
     Add every item of newCollection to the receiver just after
     oldObject, answer it. Fail if oldObject is not found

addAll: newCollection afterIndex: i
     Add every item of newCollection to the receiver just after the
     i-th, answer it. Fail if i < 0 or i > self size

addAll: newCollection before: oldObject
     Add every item of newCollection to the receiver just before
     oldObject, answer it. Fail if oldObject is not found

addAll: newCollection beforeIndex: i
     Add every item of newCollection to the receiver just before the
     i-th, answer it. Fail if i < 1 or i > self size + 1

addAllFirst: aCollection
     Add every item of newCollection to the receiver right at the start
     of the receiver. Answer aCollection

addAllLast: aCollection
     Add every item of newCollection to the receiver right at the end
     of the receiver. Answer aCollection

addFirst: newObject
     Add newObject to the receiver right at the start of the receiver.
     Answer newObject

addLast: newObject
     Add newObject to the receiver right at the end of the receiver.
     Answer newObject



File: gst-base.info,  Node: OrderedCollection-removing,  Prev: OrderedCollection-adding,  Up: OrderedCollection

1.119.4 OrderedCollection: removing
-----------------------------------

remove: anObject ifAbsent: aBlock
     Remove anObject from the receiver. If it can't be found, answer the
     result of evaluating aBlock

removeAtIndex: anIndex
     Remove the object at index anIndex from the receiver. Fail if the
     index is out of bounds

removeFirst
     Remove an object from the start of the receiver. Fail if the
     receiver is empty

removeLast
     Remove an object from the end of the receiver. Fail if the receiver
     is empty



File: gst-base.info,  Node: Package,  Next: PackageLoader,  Prev: OrderedCollection,  Up: Base classes

1.120 Package
=============

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Packaging
     I am not part of a standard Smalltalk system. I store internally
     the information on a Smalltalk package, and can output my
     description in XML.

* Menu:

* Package-accessing::  (instance)


File: gst-base.info,  Node: Package-accessing,  Up: Package

1.120.1 Package: accessing
--------------------------

allFiles
     Answer an OrderedCollection of all the files, both built and
     distributed, that are part of the package.

baseDirs: baseDirs
     Resolve the names in the package according to the base directories
     in baseDirs, which depend on where the packages.xml is found: the
     three possible places are 1) the system kernel directory's parent
     directory, 2) the local kernel directory's parent directory, 3) the
     local image directory (in order of decreasing priority).  For a
     packages.xml found in the system kernel directory's parent
     directory, all three directories are searched.  For a packages.xml
     found in the local kernel directory's parent directory, only
     directories 2 and 3 are searched.  For a packages.xml directory in
     the local image directory, instead, only directory 3 is searched.

builtFiles
     Answer a (modifiable) OrderedCollection of files that are part of
     the package but are not distributed.

callouts
     Answer a (modifiable) Set of call-outs that are required to load
     the package.  Their presence is checked after the libraries and
     modules are loaded so that you can do a kind of versioning.

createNamespace
     Private - Create the path of namespaces indicated by our namespace
     field in dot notation, and answer the final namespace

directory
     Answer the base directory from which to load the package.

directory: dir
     Set the base directory from which to load the package to dir.

features
     Answer a (modifiable) Set of features provided by the package.

fileIn
     Private - File in the given package without paying attention at
     dependencies and C callout availability

fileIns
     Answer a (modifiable) OrderedCollections of files that are to be
     filed-in to load the package.  This is usually a subset of `files'
     and `builtFiles'.

files
     Answer a (modifiable) OrderedCollection of files that are part of
     the package.

findBaseDirs: baseDirs for: aCollection
     Resolve the names in aCollection according to the base directories
     in baseDirs, and return the collection with the full filenames, or
     nil if no directory was found for one or more file in aCollection.

findBaseDirs: baseDirs forFile: fileName
     Try appending 'self directory' and fileName to each of the
     directory in baseDirs, and return the path to the first tried
     filename that exists.  Return nil if no directory is found that
     contains the file.

libraries
     Answer a (modifiable) Set of shared library names that are
     required to load the package.

modules
     Answer a (modifiable) Set of modules that are required to load the
     package.

name
     Answer the name of the package.

name: aString
     Set to aString the name of the package.

namespace
     Answer the namespace in which the package is loaded.

namespace: aString
     Set to aString the namespace in which the package is loaded.

prerequisites
     Answer a (modifiable) Set of prerequisites.

printOn: aStream
     Print a representation of the receiver on aStream (it happens to
     be XML.

printXmlOn: aStream collection: aCollection tag: aString
     Private - Print aCollection on aStream as a sequence of aString
     tags.



File: gst-base.info,  Node: PackageLoader,  Next: Permission,  Prev: Package,  Up: Base classes

1.121 PackageLoader
===================

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Packaging
     I am not part of a standard Smalltalk system. I provide methods for
     retrieving package information from an XML file and to load
     packages into a Smalltalk image, correctly handling dependencies.

* Menu:

* PackageLoader class-accessing::  (class)
* PackageLoader class-loading::  (class)
* PackageLoader class-testing::  (class)


File: gst-base.info,  Node: PackageLoader class-accessing,  Next: PackageLoader class-loading,  Up: PackageLoader

1.121.1 PackageLoader class: accessing
--------------------------------------

builtFilesFor: package
     Answer a Set of Strings containing the filenames of the given
     package's machine-generated files (relative to the directory
     answered by #directoryFor:)

calloutsFor: package
     Answer a Set of Strings containing the filenames of the given
     package's required callouts (relative to the directory answered by
     #directoryFor:)

directoryFor: package
     Answer a complete path to the given package's files

featuresFor: package
     Answer a Set of Strings containing the features provided by the
     given package.

fileInsFor: package
     Answer a Set of Strings containing the filenames of the given
     package's file-ins (relative to the directory answered by
     #directoryFor:)

filesFor: package
     Answer a Set of Strings containing the filenames of the given
     package's files (relative to the directory answered by
     #directoryFor:)

flush
     Set to reload the `packages.xml' file the next time it is needed.

ignoreCallouts
     Answer whether unavailable C callouts must generate errors or not.

ignoreCallouts: aBoolean
     Set whether unavailable C callouts must generate errors or not.

librariesFor: package
     Answer a Set of Strings containing the filenames of the given
     package's libraries (relative to the directory answered by
     #directoryFor:)

modulesFor: package
     Answer a Set of Strings containing the filenames of the given
     package's modules (relative to the directory answered by
     #directoryFor:)

packageAt: package
     Answer a Package object for the given package

prerequisitesFor: package
     Answer a Set of Strings containing the prerequisites for the given
     package

refreshDependencies
     Reload the `packages.xml' file in the image and kernel directories.
     The three possible places are 1) the system kernel directory's
     parent directory, 2) the local kernel directory's parent
     directory, 3) the local image directory (in order of decreasing
     priority).  For a packages.xml found in the system kernel
     directory's parent directory, all three directories are searched.
     For a packages.xml found in the local kernel directory's parent
     directory, only directories 2 and 3 are searched.  For a
     packages.xml directory in the local image directory, instead, only
     directory 3 is searched.



File: gst-base.info,  Node: PackageLoader class-loading,  Next: PackageLoader class-testing,  Prev: PackageLoader class-accessing,  Up: PackageLoader

1.121.2 PackageLoader class: loading
------------------------------------

extractDependenciesFor: packagesList onError: aBlock
     Answer an OrderedCollection containing all the packages which you
     have to load to enable the packages in packagesList, in an
     appropriate order. For example PackageLoader
     extractDependenciesFor: #('BloxTestSuite' 'Blox' 'Browser') on a
     newly built image will evaluate to an OrderedCollection containing
     'Kernel', 'Blox', 'BloxTestSuite' and 'Browser'. Note that Blox
     has been moved before BloxTestSuite.  Pass an error message to
     aBlock if one or more packages need prerequisites which are not
     available.

fileInPackage: package
     File in the given package into GNU Smalltalk.

fileInPackages: packagesList
     File in all the packages in packagesList into GNU Smalltalk.



File: gst-base.info,  Node: PackageLoader class-testing,  Prev: PackageLoader class-loading,  Up: PackageLoader

1.121.3 PackageLoader class: testing
------------------------------------

canLoad: package
     Answer whether all the needed pre-requisites for package are
     available.



File: gst-base.info,  Node: Permission,  Next: PluggableAdaptor,  Prev: PackageLoader,  Up: Base classes

1.122 Permission
================

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Security
     I am the basic class that represents whether operations that could
     harm the system's security are allowed or denied.

* Menu:

* Permission class-testing::  (class)
* Permission-accessing::  (instance)
* Permission-testing::  (instance)


File: gst-base.info,  Node: Permission class-testing,  Next: Permission-accessing,  Up: Permission

1.122.1 Permission class: testing
---------------------------------

allowing: aSymbol target: aTarget action: action
     Not commented.

allowing: aSymbol target: aTarget actions: actionsArray
     Not commented.

denying: aSymbol target: aTarget action: action
     Not commented.

denying: aSymbol target: aTarget actions: actionsArray
     Not commented.

granting: aSymbol target: aTarget action: action
     Not commented.

granting: aSymbol target: aTarget actions: actionsArray
     Not commented.

name: aSymbol target: aTarget action: action
     Not commented.

name: aSymbol target: aTarget actions: actionsArray
     Not commented.



File: gst-base.info,  Node: Permission-accessing,  Next: Permission-testing,  Prev: Permission class-testing,  Up: Permission

1.122.2 Permission: accessing
-----------------------------

action: anObject
     Not commented.

actions
     Answer `actions'.

actions: anObject
     Not commented.

allow
     Not commented.

allowing
     Not commented.

deny
     Not commented.

denying
     Not commented.

isAllowing
     Answer `positive'.

name
     Answer `name'.

name: anObject
     Not commented.

target
     Answer `target'.

target: anObject
     Not commented.



File: gst-base.info,  Node: Permission-testing,  Prev: Permission-accessing,  Up: Permission

1.122.3 Permission: testing
---------------------------

check: aPermission for: anObject
     Not commented.

implies: aPermission
     Not commented.



File: gst-base.info,  Node: PluggableAdaptor,  Next: PluggableProxy,  Prev: Permission,  Up: Base classes

1.123 PluggableAdaptor
======================

Defined in namespace Smalltalk
Superclass: ValueAdaptor
Category: Language-Data types
     I mediate between complex get/set behavior and the #value/#value:
     protocol used by ValueAdaptors. The get/set behavior can be
     implemented by two blocks, or can be delegated to another object
     with messages such as #someProperty to get and #someProperty: to
     set.

* Menu:

* PluggableAdaptor class-creating instances::  (class)
* PluggableAdaptor-accessing::  (instance)


File: gst-base.info,  Node: PluggableAdaptor class-creating instances,  Next: PluggableAdaptor-accessing,  Up: PluggableAdaptor

1.123.1 PluggableAdaptor class: creating instances
--------------------------------------------------

getBlock: getBlock putBlock: putBlock
     Answer a PluggableAdaptor using the given blocks to implement
     #value and #value:

on: anObject aspect: aSymbol
     Answer a PluggableAdaptor using anObject's aSymbol message to
     implement #value, and anObject's aSymbol: message (aSymbol
     followed by a colon) to implement #value:

on: anObject getSelector: getSelector putSelector: putSelector
     Answer a PluggableAdaptor using anObject's getSelector message to
     implement #value, and anObject's putSelector message to implement
     #value:

     message 

on: anObject index: anIndex
     Answer a PluggableAdaptor using anObject's #at: and #at:put:
     message to implement #value and #value:; the first parameter of
     #at: and #at:put: is anIndex

on: aDictionary key: aKey
     Same as #on:index:. Provided for clarity and completeness.



File: gst-base.info,  Node: PluggableAdaptor-accessing,  Prev: PluggableAdaptor class-creating instances,  Up: PluggableAdaptor

1.123.2 PluggableAdaptor: accessing
-----------------------------------

value
     Get the value of the receiver.

value: anObject
     Set the value of the receiver.



File: gst-base.info,  Node: PluggableProxy,  Next: Point,  Prev: PluggableAdaptor,  Up: Base classes

1.124 PluggableProxy
====================

Defined in namespace Smalltalk
Superclass: AlternativeObjectProxy
Category: Streams-Files
     I am a proxy that stores a different object and, upon load, sends
     #reconstructOriginalObject to that object (which can be a
     DirectedMessage, in which case the message is sent).  The object
     to be stored is retrieved by sending #binaryRepresentationObject to
     the object.

* Menu:

* PluggableProxy class-accessing::  (class)
* PluggableProxy-saving and restoring::  (instance)


File: gst-base.info,  Node: PluggableProxy class-accessing,  Next: PluggableProxy-saving and restoring,  Up: PluggableProxy

1.124.1 PluggableProxy class: accessing
---------------------------------------

on: anObject
     Answer a proxy to be used to save anObject.  The proxy stores a
     different object obtained by sending to anObject the
     #binaryRepresentationObject message (embedded between #preStore
     and #postStore as usual).



File: gst-base.info,  Node: PluggableProxy-saving and restoring,  Prev: PluggableProxy class-accessing,  Up: PluggableProxy

1.124.2 PluggableProxy: saving and restoring
--------------------------------------------

object
     Reconstruct the object stored in the proxy and answer it; the
     binaryRepresentationObject is sent the #reconstructOriginalObject
     message, and the resulting object is sent the #postLoad message.



File: gst-base.info,  Node: Point,  Next: PositionableStream,  Prev: PluggableProxy,  Up: Base classes

1.125 Point
===========

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Data types
     Beginning of a Point class for simple display manipulation.  Has
     not been  exhaustively tested but appears to work for the basic
     primitives and for  the needs of the Rectangle class.

* Menu:

* Point class-instance creation::  (class)
* Point-accessing::  (instance)
* Point-arithmetic::  (instance)
* Point-comparing::  (instance)
* Point-converting::  (instance)
* Point-point functions::  (instance)
* Point-printing::  (instance)
* Point-storing::  (instance)
* Point-truncation and round off::  (instance)


File: gst-base.info,  Node: Point class-instance creation,  Next: Point-accessing,  Up: Point

1.125.1 Point class: instance creation
--------------------------------------

new
     Create a new point with both coordinates set to 0

x: xInteger y: yInteger
     Create a new point with the given coordinates



File: gst-base.info,  Node: Point-accessing,  Next: Point-arithmetic,  Prev: Point class-instance creation,  Up: Point

1.125.2 Point: accessing
------------------------

x
     Answer the x coordinate

x: aNumber
     Set the x coordinate to aNumber

x: anXNumber y: aYNumber
     Set the x and y coordinate to anXNumber and aYNumber, respectively

y
     Answer the y coordinate

y: aNumber
     Set the y coordinate to aNumber



File: gst-base.info,  Node: Point-arithmetic,  Next: Point-comparing,  Prev: Point-accessing,  Up: Point

1.125.3 Point: arithmetic
-------------------------

* scale
     Multiply the receiver by scale, which can be a Number or a Point

+ delta
     Sum the receiver and delta, which can be a Number or a Point

- delta
     Subtract delta, which can be a Number or a Point, from the receiver

/ scale
     Divide the receiver by scale, which can be a Number or a Point,
     with no loss of precision

// scale
     Divide the receiver by scale, which can be a Number or a Point,
     with truncation towards -infinity

abs
     Answer a new point whose coordinates are the absolute values of the
     receiver's



File: gst-base.info,  Node: Point-comparing,  Next: Point-converting,  Prev: Point-arithmetic,  Up: Point

1.125.4 Point: comparing
------------------------

< aPoint
     Answer whether the receiver is higher and to the left of aPoint

<= aPoint
     Answer whether aPoint is equal to the receiver, or the receiver is
     higher and to the left of aPoint

= aPoint
     Answer whether the receiver is equal to aPoint

> aPoint
     Answer whether the receiver is lower and to the right of aPoint

>= aPoint
     Answer whether aPoint is equal to the receiver, or the receiver is
     lower and to the right of aPoint

max: aPoint
     Answer self if it is lower and to the right of aPoint, aPoint
     otherwise

min: aPoint
     Answer self if it is higher and to the left of aPoint, aPoint
     otherwise



File: gst-base.info,  Node: Point-converting,  Next: Point-point functions,  Prev: Point-comparing,  Up: Point

1.125.5 Point: converting
-------------------------

asPoint
     Answer the receiver.

asRectangle
     Answer an empty rectangle whose origin is self

corner: aPoint
     Answer a Rectangle whose origin is the receiver and whose corner
     is aPoint

extent: aPoint
     Answer a Rectangle whose origin is the receiver and whose extent
     is aPoint

hash
     Answer an hash value for the receiver



File: gst-base.info,  Node: Point-point functions,  Next: Point-printing,  Prev: Point-converting,  Up: Point

1.125.6 Point: point functions
------------------------------

arcTan
     Answer the angle (measured counterclockwise) between the receiver
     and a ray starting in (0, 0) and moving towards (1, 0) - i.e. 3
     o'clock

dist: aPoint
     Answer the distance between the receiver and aPoint

dotProduct: aPoint
     Answer the dot product between the receiver and aPoint

grid: aPoint
     Answer a new point whose coordinates are rounded towards the
     nearest multiple of aPoint

normal
     Rotate the Point 90degrees clockwise and get the unit vector

transpose
     Answer a new point whose coordinates are the receiver's coordinates
     exchanged (x becomes y, y becomes x)

truncatedGrid: aPoint
     Answer a new point whose coordinates are rounded towards -infinity,
     to a multiple of grid (which must be a Point)



File: gst-base.info,  Node: Point-printing,  Next: Point-storing,  Prev: Point-point functions,  Up: Point

1.125.7 Point: printing
-----------------------

printOn: aStream
     Print a representation for the receiver on aStream



File: gst-base.info,  Node: Point-storing,  Next: Point-truncation and round off,  Prev: Point-printing,  Up: Point

1.125.8 Point: storing
----------------------

storeOn: aStream
     Print Smalltalk code compiling to the receiver on aStream



File: gst-base.info,  Node: Point-truncation and round off,  Prev: Point-storing,  Up: Point

1.125.9 Point: truncation and round off
---------------------------------------

rounded
     Answer a new point whose coordinates are rounded to the nearest
     integer

truncateTo: grid
     Answer a new point whose coordinates are rounded towards -infinity,
     to a multiple of grid (which must be a Number)



File: gst-base.info,  Node: PositionableStream,  Next: Process,  Prev: Point,  Up: Base classes

1.126 PositionableStream
========================

Defined in namespace Smalltalk
Superclass: Stream
Category: Streams-Collections
     My instances represent streams where explicit positioning is
     permitted.  Thus, my streams act in a manner to normal disk files:
     you can read or write sequentially, but also position the file to
     a particular place whenever you choose.  Generally, you'll want to
     use ReadStream, WriteStream or ReadWriteStream instead of me to
     create and use streams.

* Menu:

* PositionableStream class-instance creation::  (class)
* PositionableStream-accessing-reading::  (instance)
* PositionableStream-class type methods::  (instance)
* PositionableStream-positioning::  (instance)
* PositionableStream-testing::  (instance)
* PositionableStream-truncating::  (instance)


File: gst-base.info,  Node: PositionableStream class-instance creation,  Next: PositionableStream-accessing-reading,  Up: PositionableStream

1.126.1 PositionableStream class: instance creation
---------------------------------------------------

on: aCollection
     Answer an instance of the receiver streaming on the whole contents
     of aCollection

on: aCollection from: firstIndex to: lastIndex
     Answer an instance of the receiver streaming from the
     firstIndex-th item of aCollection to the lastIndex-th



File: gst-base.info,  Node: PositionableStream-accessing-reading,  Next: PositionableStream-class type methods,  Prev: PositionableStream class-instance creation,  Up: PositionableStream

1.126.2 PositionableStream: accessing-reading
---------------------------------------------

close
     Disassociate a stream from its backing store.

contents
     Returns a collection of the same type that the stream accesses, up
     to and including the final element.

copyFrom: start to: end
     Answer the collection on which the receiver is streaming, from the
     start-th item to the end-th

next
     Answer the next item of the receiver.  Returns nil when at end of
     stream.

peek
     Returns the next element of the stream without moving the pointer.
     Returns nil when at end of stream.

peekFor: anObject
     Returns true and gobbles the next element from the stream of it is
     equal to anObject, returns false and doesn't gobble the next
     element if the next element is not equal to anObject.

reverseContents
     Returns a collection of the same type that the stream accesses, up
     to and including the final element, but in reverse order.



File: gst-base.info,  Node: PositionableStream-class type methods,  Next: PositionableStream-positioning,  Prev: PositionableStream-accessing-reading,  Up: PositionableStream

1.126.3 PositionableStream: class type methods
----------------------------------------------

isExternalStream
     We stream on a collection residing in the image, so answer false

species
     The collections returned by #upTo: etc. are the same kind as those
     returned by the collection with methods such as #select:



File: gst-base.info,  Node: PositionableStream-positioning,  Next: PositionableStream-testing,  Prev: PositionableStream-class type methods,  Up: PositionableStream

1.126.4 PositionableStream: positioning
---------------------------------------

basicPosition: anInteger
     Move the stream pointer to the anInteger-th object

position
     Answer the current value of the stream pointer

position: anInteger
     Move the stream pointer to the anInteger-th object

reset
     Move the stream back to its first element. For write-only streams,
     the stream is truncated there.

setToEnd
     Move the current position to the end of the stream.

size
     Answer the size of data on which we are streaming.

skip: anInteger
     Move the current position by anInteger places, either forwards or
     backwards.

skipSeparators
     Advance the receiver until we find a character that is not a
     separator.  Answer false if we reach the end of the stream, else
     answer true; in this case, sending #next will return the first
     non-separator character (possibly the same to which the stream
     pointed before #skipSeparators was sent).



File: gst-base.info,  Node: PositionableStream-testing,  Next: PositionableStream-truncating,  Prev: PositionableStream-positioning,  Up: PositionableStream

1.126.5 PositionableStream: testing
-----------------------------------

atEnd
     Answer whether the objects in the stream have reached an end

basicAtEnd
     Answer whether the objects in the stream have reached an end.
     This method must NOT be overridden.

isEmpty
     Answer whether the stream has no objects



File: gst-base.info,  Node: PositionableStream-truncating,  Prev: PositionableStream-testing,  Up: PositionableStream

1.126.6 PositionableStream: truncating
--------------------------------------

truncate
     Truncate the receiver to the current position - only valid for
     writing streams



File: gst-base.info,  Node: Process,  Next: ProcessorScheduler,  Prev: PositionableStream,  Up: Base classes

1.127 Process
=============

Defined in namespace Smalltalk
Superclass: Link
Category: Language-Processes
     I represent a unit of computation.  My instances are independantly
     executable blocks that have a priority associated with them, and
     they can suspend themselves and resume themselves however they
     wish.

* Menu:

* Process-accessing::  (instance)
* Process-basic::  (instance)
* Process-builtins::  (instance)
* Process-printing::  (instance)


File: gst-base.info,  Node: Process-accessing,  Next: Process-basic,  Up: Process

1.127.1 Process: accessing
--------------------------

externalInterruptsEnabled
     Answer whether the receiver is executed with interrupts enabled

name
     Answer the user-friendly name of the process.

name: aString
     Give the name aString to the process

priority
     Answer the receiver's priority

priority: anInteger
     Change the receiver's priority to anInteger

queueInterrupt: aBlock
     Force the receiver to be interrupted and to evaluate aBlock as
     soon as it becomes the active process (this could mean NOW if the
     receiver is active).  If the process is temporarily suspended or
     waiting on a semaphore, it is temporarily woken up so that the
     interrupt is processed as soon as the process priority allows to
     do.  Answer the receiver.

setPriorityFrom: activePriority to: anInteger suspend: aBoolean
     Change the priority to anInteger.  If aBoolean is true, suspend
     the process after having done so; if it is false, check if it is
     nicer to relinquish control from the running process (based on the
     priority of the active process, that is passed in activePriority)
     and if this is the case, preempt it.

suspendedContext
     Answer the context that the process was executing at the time it
     was suspended.

valueWithoutInterrupts: aBlock
     Evaluate aBlock and delay all interrupts that are requested during
     its execution to after aBlock returns.



File: gst-base.info,  Node: Process-basic,  Next: Process-builtins,  Prev: Process-accessing,  Up: Process

1.127.2 Process: basic
----------------------

lowerPriority
     Lower a bit the priority of the receiver. A #lowerPriority will
     cancel a previous #raisePriority, and vice versa.

makeUntrusted: aBoolean
     Set whether the receiver is trusted or not.

primTerminate
     Terminate the receiver - This is nothing more than prohibiting to
     resume the process, then suspending it.

raisePriority
     Raise a bit the priority of the receiver. A #lowerPriority will
     cancel a previous #raisePriority, and vice versa.

singleStep
     Execute a limited amount of code (usually a bytecode, or up to the
     next backward jump, or up to the next message send) of the
     receiver, which must in a ready-to-run state (neither executing
     nor terminating nor suspended), then restart running the current
     process.  The current process should have higher priority than the
     receiver.  For better performance, use the underlying primitive,
     Process>>#singleStepWaitingOn:.

suspend
     Do nothing if we're already suspended. Note that the blue book made
     suspend a primitive - but the real primitive is yielding control to
     another process. Suspending is nothing more than taking ourselves
     out of every scheduling list and THEN yielding control to another
     process

terminate
     Terminate the receiver after having evaluated all the #ensure: and
     #ifCurtailed: blocks that are active in it.  This is done by
     signalling a ProcessBeingTerminated notification.



File: gst-base.info,  Node: Process-builtins,  Next: Process-printing,  Prev: Process-basic,  Up: Process

1.127.3 Process: builtins
-------------------------

resume
     Resume the receiver's execution

singleStepWaitingOn: aSemaphore
     Execute a limited amount of code (usually a bytecode, or up to the
     next backward jump, or up to the next message send) of the
     receiver, which must in a ready-to-run state (neither executing
     nor terminating nor suspended), then restart running the current
     process.  aSemaphore is used as a means to synchronize the
     execution of the current process and the receiver and should have
     no signals on it.  The current process should have higher priority
     than the receiver.

yield
     Yield control from the receiver to other processes



File: gst-base.info,  Node: Process-printing,  Prev: Process-builtins,  Up: Process

1.127.4 Process: printing
-------------------------

printOn: aStream
     Print a representation of the receiver on aStream



File: gst-base.info,  Node: ProcessorScheduler,  Next: Promise,  Prev: Process,  Up: Base classes

1.128 ProcessorScheduler
========================

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Processes
     I provide methods that control the execution of processes.

* Menu:

* ProcessorScheduler class-instance creation::  (class)
* ProcessorScheduler-basic::  (instance)
* ProcessorScheduler-built ins::  (instance)
* ProcessorScheduler-idle tasks::  (instance)
* ProcessorScheduler-printing::  (instance)
* ProcessorScheduler-priorities::  (instance)
* ProcessorScheduler-storing::  (instance)
* ProcessorScheduler-timed invocation::  (instance)


File: gst-base.info,  Node: ProcessorScheduler class-instance creation,  Next: ProcessorScheduler-basic,  Up: ProcessorScheduler

1.128.1 ProcessorScheduler class: instance creation
---------------------------------------------------

new
     Error--new instances of ProcessorScheduler should not be created.



File: gst-base.info,  Node: ProcessorScheduler-basic,  Next: ProcessorScheduler-built ins,  Prev: ProcessorScheduler class-instance creation,  Up: ProcessorScheduler

1.128.2 ProcessorScheduler: basic
---------------------------------

activePriority
     Answer the active process' priority

activeProcess
     Answer the active process

changePriorityListOf: aProcess to: aPriority suspend: aBoolean
     Private - Move aProcess to the execution list for aPriority,
     answer the new execution list

processesAt: aPriority
     Answer a linked list of processes at the given priority

terminateActive
     Terminate the active process

timeSlice
     Answer the timeslice that is assigned to each Process before it is
     automatically preempted by the system (in milliseconds).  An
     answer of zero means that preemptive multitasking is disabled.
     Note that the system by default is compiled without preemptive
     multitasking, and that even if it is enabled it will work only
     under BSD derivatives (or, in general, systems that support
     ITIMER_VIRTUAL).

timeSlice: milliSeconds
     Set the timeslice that is assigned to each Process before it is
     automatically preempted by the system.  Setting this to zero
     disables preemptive multitasking.  Note that the system by default
     is compiled with preemptive multitasking disabled, and that even
     if it is enabled it will surely work only under BSD derivatives
     (or, in general, systems that support ITIMER_VIRTUAL).

yield
     Let the active process yield control to other processes



File: gst-base.info,  Node: ProcessorScheduler-built ins,  Next: ProcessorScheduler-idle tasks,  Prev: ProcessorScheduler-basic,  Up: ProcessorScheduler

1.128.3 ProcessorScheduler: built ins
-------------------------------------

     twice

disableInterrupts
     Disable interrupts caused by external events while the current
     process is executing.  Note that interrupts are disabled on a
     per-process basis, and that calling #disableInterrupts twice
     requires calling #enableInterrupts twice as well to re-enable
     interrupts.

enableInterrupts
     Re-enable interrupts caused by external events while the current
     process is executing.  By default, interrupts are enabled.



File: gst-base.info,  Node: ProcessorScheduler-idle tasks,  Next: ProcessorScheduler-printing,  Prev: ProcessorScheduler-built ins,  Up: ProcessorScheduler

1.128.4 ProcessorScheduler: idle tasks
--------------------------------------

idle
     Private - Call the next idle task

idleAdd: aBlock
     Register aBlock to be executed when things are idle

initialize
     Private - Start the finalization process.

update: aSymbol
     If we left some work behind when the image was saved, do it now.



File: gst-base.info,  Node: ProcessorScheduler-printing,  Next: ProcessorScheduler-priorities,  Prev: ProcessorScheduler-idle tasks,  Up: ProcessorScheduler

1.128.5 ProcessorScheduler: printing
------------------------------------

printOn: aStream
     Store onto aStream a printed representation of the receiver



File: gst-base.info,  Node: ProcessorScheduler-priorities,  Next: ProcessorScheduler-storing,  Prev: ProcessorScheduler-printing,  Up: ProcessorScheduler

1.128.6 ProcessorScheduler: priorities
--------------------------------------

highestPriority
     Answer the highest valid priority

highIOPriority
     Answer the priority for system high-priority I/O processes, such
     as a process handling input from a network.

lowestPriority
     Answer the lowest valid priority

lowIOPriority
     Answer the priority for system low-priority I/O processes.
     Examples are the process handling input from the user (keyboard,
     pointing device, etc.) and the process distributing input from a
     network.

priorityName: priority
     Private - Answer a name for the given process priority

rockBottomPriority
     Answer the lowest valid priority

systemBackgroundPriority
     Answer the priority for system background-priority processes.
     Examples are an incremental garbage collector or status checker.

timingPriority
     Answer the priority for system real-time processes.

unpreemptedPriority
     Answer the highest priority avilable in the system; never create a
     process with this priority, instead use
     BlockClosure>>#valueWithoutPreemption.

userBackgroundPriority
     Answer the priority for user background-priority processes

userInterruptPriority
     Answer the priority for user interrupt-priority processes.
     Processes run at this level will preempt the window scheduler and
     should, therefore, not consume the processor forever.

userSchedulingPriority
     Answer the priority for user standard-priority processes



File: gst-base.info,  Node: ProcessorScheduler-storing,  Next: ProcessorScheduler-timed invocation,  Prev: ProcessorScheduler-priorities,  Up: ProcessorScheduler

1.128.7 ProcessorScheduler: storing
-----------------------------------

storeOn: aStream
     Store onto aStream a Smalltalk expression which evaluates to the
     receiver



File: gst-base.info,  Node: ProcessorScheduler-timed invocation,  Prev: ProcessorScheduler-storing,  Up: ProcessorScheduler

1.128.8 ProcessorScheduler: timed invocation
--------------------------------------------

isTimeoutProgrammed
     Private - Answer whether there is a pending call to
     #signal:atMilliseconds:

signal: aSemaphore atMilliseconds: millis
     Private - signal 'aSemaphore' after 'millis' milliseconds have
     elapsed

signal: aSemaphore onInterrupt: anIntegerSignalNumber
     Private - signal 'aSemaphore' when the given C signal occurs



File: gst-base.info,  Node: Promise,  Next: Random,  Prev: ProcessorScheduler,  Up: Base classes

1.129 Promise
=============

Defined in namespace Smalltalk
Superclass: ValueHolder
Category: Language-Data types
     I store my value in a variable, and know whether I have been
     initialized or not.  If you ask for my value and I have not been
     initialized, I suspend the process until a value has been assigned.

* Menu:

* Promise class-creating instances::  (class)
* Promise-accessing::  (instance)
* Promise-initializing::  (instance)
* Promise-printing::  (instance)


File: gst-base.info,  Node: Promise class-creating instances,  Next: Promise-accessing,  Up: Promise

1.129.1 Promise class: creating instances
-----------------------------------------

null
     This method should not be called for instances of this class.



File: gst-base.info,  Node: Promise-accessing,  Next: Promise-initializing,  Prev: Promise class-creating instances,  Up: Promise

1.129.2 Promise: accessing
--------------------------

hasValue
     Answer whether we already have a value.

value
     Get the value of the receiver.

value: anObject
     Set the value of the receiver.



File: gst-base.info,  Node: Promise-initializing,  Next: Promise-printing,  Prev: Promise-accessing,  Up: Promise

1.129.3 Promise: initializing
-----------------------------

initialize
     Private - set the initial state of the receiver



File: gst-base.info,  Node: Promise-printing,  Prev: Promise-initializing,  Up: Promise

1.129.4 Promise: printing
-------------------------

printOn: aStream
     Print a representation of the receiver



File: gst-base.info,  Node: Random,  Next: ReadStream,  Prev: Promise,  Up: Base classes

1.130 Random
============

Defined in namespace Smalltalk
Superclass: Stream
Category: Streams
     My instances are generator streams that produce random numbers,
     which are floating point values between 0 and 1.

* Menu:

* Random class-instance creation::  (class)
* Random class-shortcuts::  (class)
* Random-basic::  (instance)
* Random-testing::  (instance)


File: gst-base.info,  Node: Random class-instance creation,  Next: Random class-shortcuts,  Up: Random

1.130.1 Random class: instance creation
---------------------------------------

new
     Create a new random number generator whose seed is given by the
     current time on the millisecond clock

seed: aFloat
     Create a new random number generator whose seed is aFloat



File: gst-base.info,  Node: Random class-shortcuts,  Next: Random-basic,  Prev: Random class-instance creation,  Up: Random

1.130.2 Random class: shortcuts
-------------------------------

between: low and: high
     Return a random integer between the given extrema

next
     Return a random number between 0 and 1 (excluded)



File: gst-base.info,  Node: Random-basic,  Next: Random-testing,  Prev: Random class-shortcuts,  Up: Random

1.130.3 Random: basic
---------------------

atEnd
     This stream never ends. Always answer false.

between: low and: high
     Return a random integer between low and high.

next
     Return the next random number in the sequence.

nextPut: value
     This method should not be called for instances of this class.



File: gst-base.info,  Node: Random-testing,  Prev: Random-basic,  Up: Random

1.130.4 Random: testing
-----------------------

chiSquare
     Compute the chi-square of the random that this class generates.

chiSquare: n range: r
     Return the chi-square deduced from calculating n random numbers in
     the 0..r range.



File: gst-base.info,  Node: ReadStream,  Next: ReadWriteStream,  Prev: Random,  Up: Base classes

1.131 ReadStream
================

Defined in namespace Smalltalk
Superclass: PositionableStream
Category: Streams-Collections
     I implement the set of read-only stream objects.  You may read from
     my objects, but you may not write to them.

* Menu:

* ReadStream class-instance creation::  (class)
* ReadStream-accessing-reading::  (instance)


File: gst-base.info,  Node: ReadStream class-instance creation,  Next: ReadStream-accessing-reading,  Up: ReadStream

1.131.1 ReadStream class: instance creation
-------------------------------------------

on: aCollection
     Answer a new stream working on aCollection from its start.



File: gst-base.info,  Node: ReadStream-accessing-reading,  Prev: ReadStream class-instance creation,  Up: ReadStream

1.131.2 ReadStream: accessing-reading
-------------------------------------

reverseContents
     May be faster than generic stream reverseContents.

size
     Answer the receiver's size.



File: gst-base.info,  Node: ReadWriteStream,  Next: Rectangle,  Prev: ReadStream,  Up: Base classes

1.132 ReadWriteStream
=====================

Defined in namespace Smalltalk
Superclass: WriteStream
Category: Streams-Collections
     I am the class of streams that may be read and written from
     simultaneously.  In some sense, I am the best of both ReadStream
     and WriteStream.

* Menu:

* ReadWriteStream class-instance creation::  (class)
* ReadWriteStream-positioning::  (instance)


File: gst-base.info,  Node: ReadWriteStream class-instance creation,  Next: ReadWriteStream-positioning,  Up: ReadWriteStream

1.132.1 ReadWriteStream class: instance creation
------------------------------------------------

on: aCollection
     Answer a new stream working on aCollection from its start. The
     stream starts at the front of aCollection

with: aCollection
     Answer a new instance of the receiver which streams from the end
     of aCollection.



File: gst-base.info,  Node: ReadWriteStream-positioning,  Prev: ReadWriteStream class-instance creation,  Up: ReadWriteStream

1.132.2 ReadWriteStream: positioning
------------------------------------

position: anInteger
     Unlike WriteStreams, ReadWriteStreams don't truncate the stream

skip: anInteger
     Unlike WriteStreams, ReadWriteStreams don't truncate the stream



File: gst-base.info,  Node: Rectangle,  Next: RecursionLock,  Prev: ReadWriteStream,  Up: Base classes

1.133 Rectangle
===============

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Data types
     Beginning of the Rectangle class for simple display manipulation.
     Rectangles require the Point class to be available.  An extension
     to the Point class is made here that since it requires Rectangles
     to be defined (see converting)

* Menu:

* Rectangle class-instance creation::  (class)
* Rectangle-accessing::  (instance)
* Rectangle-copying::  (instance)
* Rectangle-printing::  (instance)
* Rectangle-rectangle functions::  (instance)
* Rectangle-testing::  (instance)
* Rectangle-transforming::  (instance)
* Rectangle-truncation and round off::  (instance)


File: gst-base.info,  Node: Rectangle class-instance creation,  Next: Rectangle-accessing,  Up: Rectangle

1.133.1 Rectangle class: instance creation
------------------------------------------

left: leftNumber right: rightNumber top: topNumber bottom: bottomNumber
     Answer a rectangle with the given coordinates

new
     Answer the (0 @ 0 corner: 0 @ 0) rectangle

origin: originPoint corner: cornerPoint
     Answer a rectangle with the given corners

origin: originPoint extent: extentPoint
     Answer a rectangle with the given origin and size



File: gst-base.info,  Node: Rectangle-accessing,  Next: Rectangle-copying,  Prev: Rectangle class-instance creation,  Up: Rectangle

1.133.2 Rectangle: accessing
----------------------------

bottom
     Answer the corner's y of the receiver

bottom: aNumber
     Set the corner's y of the receiver

bottomCenter
     Answer the center of the receiver's bottom side

bottomLeft
     Answer the bottom-left corner of the receiver

bottomLeft: aPoint
     Answer the receiver with the bottom-left changed to aPoint

bottomRight
     Answer the bottom-right corner of the receiver

bottomRight: aPoint
     Change the bottom-right corner of the receiver

center
     Answer the center of the receiver

corner
     Answer the corner of the receiver

corner: aPoint
     Set the corner of the receiver

extent
     Answer the extent of the receiver

extent: aPoint
     Change the size of the receiver, keeping the origin the same

height
     Answer the height of the receiver

height: aNumber
     Set the height of the receiver

left
     Answer the x of the left edge of the receiver

left: aValue
     Set the x of the left edge of the receiver

left: l top: t right: r bottom: b
     Change all four the coordinates of the receiver's corners

leftCenter
     Answer the center of the receiver's left side

origin
     Answer the top-left corner of the receiver

origin: aPoint
     Change the top-left corner of the receiver to aPoint

origin: pnt1 corner: pnt2
     Change both the origin (top-left corner) and the corner
     (bottom-right corner) of the receiver

origin: pnt1 extent: pnt2
     Change the top-left corner and the size of the receiver

right
     Answer the x of the bottom-right corner of the receiver

right: aNumber
     Change the x of the bottom-right corner of the receiver

rightCenter
     Answer the center of the receiver's right side

top
     Answer the y of the receiver's top-left corner

top: aValue
     Change the y of the receiver's top-left corner

topCenter
     Answer the center of the receiver's top side

topLeft
     Answer the receiver's top-left corner

topLeft: aPoint
     Change the receiver's top-left corner's coordinates to aPoint

topRight
     Answer the receiver's top-right corner

topRight: aPoint
     Change the receiver's top-right corner to aPoint

width
     Answer the receiver's width

width: aNumber
     Change the receiver's width to aNumber



File: gst-base.info,  Node: Rectangle-copying,  Next: Rectangle-printing,  Prev: Rectangle-accessing,  Up: Rectangle

1.133.3 Rectangle: copying
--------------------------

copy
     Return a deep copy of the receiver for safety.



File: gst-base.info,  Node: Rectangle-printing,  Next: Rectangle-rectangle functions,  Prev: Rectangle-copying,  Up: Rectangle

1.133.4 Rectangle: printing
---------------------------

printOn: aStream
     Print a representation of the receiver on aStream

storeOn: aStream
     Store Smalltalk code compiling to the receiver on aStream



File: gst-base.info,  Node: Rectangle-rectangle functions,  Next: Rectangle-testing,  Prev: Rectangle-printing,  Up: Rectangle

1.133.5 Rectangle: rectangle functions
--------------------------------------

amountToTranslateWithin: aRectangle
     Answer a Point so that if aRectangle is translated by that point,
     its origin lies within the receiver's.

area
     Answer the receiver's area. The area is the width times the height,
     so it is possible for it to be negative if the rectangle is not
     normalized.

areasOutside: aRectangle
     Answer a collection of rectangles containing the parts of the
     receiver outside of aRectangle. For all points in the receiver,
     but outside aRectangle, exactly one rectangle in the collection
     will contain that point.

expandBy: delta
     Answer a new rectangle that is the receiver expanded by aValue: if
     aValue is a rectangle, calculate origin=origin-aValue origin,
     corner=corner+aValue corner; else calculate origin=origin-aValue,
     corner=corner+aValue.

insetBy: delta
     Answer a new rectangle that is the receiver inset by aValue: if
     aValue is a rectangle, calculate origin=origin+aValue origin,
     corner=corner-aValue corner; else calculate origin=origin+aValue,
     corner=corner-aValue.

insetOriginBy: originDelta corner: cornerDelta
     Answer a new rectangle that is the receiver inset so that
     origin=origin+originDelta, corner=corner-cornerDelta.  The deltas
     can be points or numbers

intersect: aRectangle
     Returns the rectangle (if any) created by the overlap of
     rectangles A and B.

merge: aRectangle
     Answer a new rectangle which is the smallest rectangle containing
     both the receiver and aRectangle.

translatedToBeWithin: aRectangle
     Answer a copy of the receiver that does not extend beyond
     aRectangle.



File: gst-base.info,  Node: Rectangle-testing,  Next: Rectangle-transforming,  Prev: Rectangle-rectangle functions,  Up: Rectangle

1.133.6 Rectangle: testing
--------------------------

= aRectangle
     Answer whether the receiver is equal to aRectangle

contains: aRectangle
     Answer true if the receiver contains (see containsPoint:) both
     aRectangle's origin and aRectangle's corner

containsPoint: aPoint
     Answer true if aPoint is equal to, or below and to the right of,
     the receiver's origin; and aPoint is above and to the left of the
     receiver's corner

hash
     Answer an hash value for the receiver

intersects: aRectangle
     Answer true if the receiver intersect aRectangle, i.e. if it
     contains (see containsPoint:) any of aRectangle corners or if
     aRectangle contains the receiver



File: gst-base.info,  Node: Rectangle-transforming,  Next: Rectangle-truncation and round off,  Prev: Rectangle-testing,  Up: Rectangle

1.133.7 Rectangle: transforming
-------------------------------

moveBy: aPoint
     Change the receiver so that the origin and corner are shifted by
     aPoint

moveTo: aPoint
     Change the receiver so that the origin moves to aPoint and the size
     remains unchanged

scaleBy: scale
     Answer a copy of the receiver in which the origin and corner are
     multiplied by scale

translateBy: factor
     Answer a copy of the receiver in which the origin and corner are
     shifted by aPoint



File: gst-base.info,  Node: Rectangle-truncation and round off,  Prev: Rectangle-transforming,  Up: Rectangle

1.133.8 Rectangle: truncation and round off
-------------------------------------------

rounded
     Answer a copy of the receiver with the coordinates rounded to the
     nearest integers



File: gst-base.info,  Node: RecursionLock,  Next: RootNamespace,  Prev: Rectangle,  Up: Base classes

1.134 RecursionLock
===================

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Processes

* Menu:

* RecursionLock class-instance creation::  (class)
* RecursionLock-accessing::  (instance)
* RecursionLock-mutual exclusion::  (instance)
* RecursionLock-printing::  (instance)


File: gst-base.info,  Node: RecursionLock class-instance creation,  Next: RecursionLock-accessing,  Up: RecursionLock

1.134.1 RecursionLock class: instance creation
----------------------------------------------

new
     Answer a new semaphore



File: gst-base.info,  Node: RecursionLock-accessing,  Next: RecursionLock-mutual exclusion,  Prev: RecursionLock class-instance creation,  Up: RecursionLock

1.134.2 RecursionLock: accessing
--------------------------------

isOwnerProcess
     Answer whether the receiver is the owner of the lock.

name
     Answer a user-defined name for the lock.

name: aString
     Set to aString the user-defined name for the lock.

waitingProcesses
     Answer the set of processes that are waiting on the semaphore.

wouldBlock
     Answer whether sending #wait to the receiver would suspend the
     active process.



File: gst-base.info,  Node: RecursionLock-mutual exclusion,  Next: RecursionLock-printing,  Prev: RecursionLock-accessing,  Up: RecursionLock

1.134.3 RecursionLock: mutual exclusion
---------------------------------------

critical: aBlock
     Wait for the receiver to be free, execute aBlock and signal the
     receiver again. Return the result of evaluating aBlock.



File: gst-base.info,  Node: RecursionLock-printing,  Prev: RecursionLock-mutual exclusion,  Up: RecursionLock

1.134.4 RecursionLock: printing
-------------------------------

printOn: aStream
     Print a human-readable represention of the receiver on aStream.



File: gst-base.info,  Node: RootNamespace,  Next: RoundRobinStream,  Prev: RecursionLock,  Up: Base classes

1.135 RootNamespace
===================

Defined in namespace Smalltalk
Superclass: AbstractNamespace
Category: Language-Implementation
     I am a special form of dictionary.  Classes hold on an instance of
     me; it is called their `environment'.

* Menu:

* RootNamespace class-instance creation::  (class)
* RootNamespace-namespace hierarchy::  (instance)
* RootNamespace-overrides for superspaces::  (instance)
* RootNamespace-printing::  (instance)


File: gst-base.info,  Node: RootNamespace class-instance creation,  Next: RootNamespace-namespace hierarchy,  Up: RootNamespace

1.135.1 RootNamespace class: instance creation
----------------------------------------------

new: spaceName
     Create a new root namespace with the given name, and add to
     Smalltalk a key that references it.



File: gst-base.info,  Node: RootNamespace-namespace hierarchy,  Next: RootNamespace-overrides for superspaces,  Prev: RootNamespace class-instance creation,  Up: RootNamespace

1.135.2 RootNamespace: namespace hierarchy
------------------------------------------

siblings
     Answer all the other root namespaces

siblingsDo: aBlock
     Evaluate aBlock once for each of the other root namespaces,
     passing the namespace as a parameter.



File: gst-base.info,  Node: RootNamespace-overrides for superspaces,  Next: RootNamespace-printing,  Prev: RootNamespace-namespace hierarchy,  Up: RootNamespace

1.135.3 RootNamespace: overrides for superspaces
------------------------------------------------

inheritedKeys
     Answer a Set of all the keys in the receiver and its superspaces

set: key to: newValue ifAbsent: aBlock
     Assign newValue to the variable named as specified by `key'.  This
     method won't define a new variable; instead if the key is not
     found it will search in superspaces and evaluate aBlock if it is
     not found. Answer newValue.



File: gst-base.info,  Node: RootNamespace-printing,  Prev: RootNamespace-overrides for superspaces,  Up: RootNamespace

1.135.4 RootNamespace: printing
-------------------------------

nameIn: aNamespace
     Answer Smalltalk code compiling to the receiver when the current
     namespace is aNamespace

printOn: aStream in: aNamespace
     Print on aStream some Smalltalk code compiling to the receiver
     when the current namespace is aNamespace

storeOn: aStream
     Store Smalltalk code compiling to the receiver



File: gst-base.info,  Node: RoundRobinStream,  Next: RunArray,  Prev: RootNamespace,  Up: Base classes

1.136 RoundRobinStream
======================

Defined in namespace Smalltalk
Superclass: Stream
Category: Language-C interface
     This class implements a peculiar stream that optimizes the order
     in which symbols are searched in dynamically linked libraries.
     When using #next, the stream will restart from the first element
     after returning nil once.  When you use #do:, the stream starts
     from the *last* element that was either returned by #next or passed
     to #do: in the previous iteration.

     Since the #primDefineExternFunc: leaves the #do: in advance if it
     succeeds in finding a symbol, the next time it will restart from
     the library in which it found a symbol.  Usually symbols have a
     very good locality (you find all the symbols in a library, or at
     least symbols in the same #methodsFor: come from the same library):
     so this avoids looking for symbols in the wrong library.

* Menu:

* RoundRobinStream class-accessing::  (class)
* RoundRobinStream class-demo::  (class)
* RoundRobinStream-accessing::  (instance)
* RoundRobinStream-basic::  (instance)


File: gst-base.info,  Node: RoundRobinStream class-accessing,  Next: RoundRobinStream class-demo,  Up: RoundRobinStream

1.136.1 RoundRobinStream class: accessing
-----------------------------------------

on: aStream
     Not commented.



File: gst-base.info,  Node: RoundRobinStream class-demo,  Next: RoundRobinStream-accessing,  Prev: RoundRobinStream class-accessing,  Up: RoundRobinStream

1.136.2 RoundRobinStream class: demo
------------------------------------

test: s get: n
     Not commented.

test: s leaveAfter: n
     Not commented.

testOn: anArray
     RoundRobinStream testOn: #(1 2 3 4 5 6)



File: gst-base.info,  Node: RoundRobinStream-accessing,  Next: RoundRobinStream-basic,  Prev: RoundRobinStream class-demo,  Up: RoundRobinStream

1.136.3 RoundRobinStream: accessing
-----------------------------------

stream
     Answer `stream'.

stream: aStream
     Not commented.



File: gst-base.info,  Node: RoundRobinStream-basic,  Prev: RoundRobinStream-accessing,  Up: RoundRobinStream

1.136.4 RoundRobinStream: basic
-------------------------------

atEnd
     Not commented.

do: aBlock
     Iterate on all the items in the Stream.  If it is not the first
     iteration, and the last item was retrieved with #next or passed to
     a #do: block *that did a global return*, return from there.

next
     Not commented.



File: gst-base.info,  Node: RunArray,  Next: ScaledDecimal,  Prev: RoundRobinStream,  Up: Base classes

1.137 RunArray
==============

Defined in namespace Smalltalk
Superclass: OrderedCollection
Category: Collections-Sequenceable
     My instances are OrderedCollections that automatically apply Run
     Length Encoding compression to the things they store. Be careful
     when using me: I can provide great space savings, but my instances
     don't grant linear access time. RunArray's behavior currently is
     similar to that of OrderedCollection (you can add elements to
     RunArrays); maybe it should behave like an ArrayedCollection.

* Menu:

* RunArray class-instance creation::  (class)
* RunArray-accessing::  (instance)
* RunArray-adding::  (instance)
* RunArray-basic::  (instance)
* RunArray-copying::  (instance)
* RunArray-enumerating::  (instance)
* RunArray-removing::  (instance)
* RunArray-searching::  (instance)
* RunArray-testing::  (instance)


File: gst-base.info,  Node: RunArray class-instance creation,  Next: RunArray-accessing,  Up: RunArray

1.137.1 RunArray class: instance creation
-----------------------------------------

new
     Answer an empty RunArray

new: aSize
     Answer a RunArray with space for aSize runs



File: gst-base.info,  Node: RunArray-accessing,  Next: RunArray-adding,  Prev: RunArray class-instance creation,  Up: RunArray

1.137.2 RunArray: accessing
---------------------------

at: anIndex
     Answer the element at index anIndex

at: anIndex put: anObject
     Replace the element at index anIndex with anObject and answer
     anObject



File: gst-base.info,  Node: RunArray-adding,  Next: RunArray-basic,  Prev: RunArray-accessing,  Up: RunArray

1.137.3 RunArray: adding
------------------------

add: anObject afterIndex: anIndex
     Add anObject after the element at index anIndex

addAll: aCollection afterIndex: anIndex
     Add all the elements of aCollection after the one at index
     anIndex. If aCollection is unordered, its elements could be added
     in an order which is not the #do: order

addAllFirst: aCollection
     Add all the elements of aCollection at the beginning of the
     receiver. If aCollection is unordered, its elements could be added
     in an order which is not the #do: order

addAllLast: aCollection
     Add all the elements of aCollection at the end of the receiver. If
     aCol- lection is unordered, its elements could be added in an
     order which is not the #do: order

addFirst: anObject
     Add anObject at the beginning of the receiver. Watch out: this
     operation can cause serious performance pitfalls

addLast: anObject
     Add anObject at the end of the receiver



File: gst-base.info,  Node: RunArray-basic,  Next: RunArray-copying,  Prev: RunArray-adding,  Up: RunArray

1.137.4 RunArray: basic
-----------------------

first
     Answer the first element in the receiver

last
     Answer the last element of the receiver

size
     Answer the number of elements in the receiver



File: gst-base.info,  Node: RunArray-copying,  Next: RunArray-enumerating,  Prev: RunArray-basic,  Up: RunArray

1.137.5 RunArray: copying
-------------------------

deepCopy
     Answer a copy of the receiver containing copies of the receiver's
     elements (#copy is used to obtain them)

shallowCopy
     Answer a copy of the receiver. The elements are not copied



File: gst-base.info,  Node: RunArray-enumerating,  Next: RunArray-removing,  Prev: RunArray-copying,  Up: RunArray

1.137.6 RunArray: enumerating
-----------------------------

do: aBlock
     Enumerate all the objects in the receiver, passing each one to
     aBlock

objectsAndRunLengthsDo: aBlock
     Enumerate all the runs in the receiver, passing to aBlock two
     parameters for every run: the first is the repeated object, the
     second is the number of copies



File: gst-base.info,  Node: RunArray-removing,  Next: RunArray-searching,  Prev: RunArray-enumerating,  Up: RunArray

1.137.7 RunArray: removing
--------------------------

removeAtIndex: anIndex
     Remove the object at index anIndex from the receiver and answer the
     removed object

removeFirst
     Remove the first object from the receiver and answer the removed
     object

removeLast
     Remove the last object from the receiver and answer the removed
     object



File: gst-base.info,  Node: RunArray-searching,  Next: RunArray-testing,  Prev: RunArray-removing,  Up: RunArray

1.137.8 RunArray: searching
---------------------------

indexOf: anObject startingAt: anIndex ifAbsent: aBlock
     Answer the index of the first copy of anObject in the receiver,
     starting the search at the element at index anIndex. If no equal
     object is found, answer the result of evaluating aBlock



File: gst-base.info,  Node: RunArray-testing,  Prev: RunArray-searching,  Up: RunArray

1.137.9 RunArray: testing
-------------------------

= anObject
     Answer true if the receiver is equal to anObject

hash
     Answer an hash value for the receiver



File: gst-base.info,  Node: ScaledDecimal,  Next: SecurityPolicy,  Prev: RunArray,  Up: Base classes

1.138 ScaledDecimal
===================

Defined in namespace Smalltalk
Superclass: Number
Category: Language-Data types
     ScaledDecimal provides a numeric representation of fixed point
     decimal numbers able to accurately represent decimal fractions.
     It supports unbounded precision, with no limit to the number of
     digits before and after the decimal point.

* Menu:

* ScaledDecimal class-constants::  (class)
* ScaledDecimal class-instance creation::  (class)
* ScaledDecimal-arithmetic::  (instance)
* ScaledDecimal-coercion::  (instance)
* ScaledDecimal-comparing::  (instance)
* ScaledDecimal-constants::  (instance)
* ScaledDecimal-printing::  (instance)
* ScaledDecimal-storing::  (instance)


File: gst-base.info,  Node: ScaledDecimal class-constants,  Next: ScaledDecimal class-instance creation,  Up: ScaledDecimal

1.138.1 ScaledDecimal class: constants
--------------------------------------

initialize
     Initialize the receiver's class variables



File: gst-base.info,  Node: ScaledDecimal class-instance creation,  Next: ScaledDecimal-arithmetic,  Prev: ScaledDecimal class-constants,  Up: ScaledDecimal

1.138.2 ScaledDecimal class: instance creation
----------------------------------------------

newFromNumber: aNumber scale: scale
     Answer a new instance of ScaledDecimal, representing a decimal
     fraction with a decimal representation considered valid up to the
     scale-th digit.



File: gst-base.info,  Node: ScaledDecimal-arithmetic,  Next: ScaledDecimal-coercion,  Prev: ScaledDecimal class-instance creation,  Up: ScaledDecimal

1.138.3 ScaledDecimal: arithmetic
---------------------------------

* aNumber
     Multiply two numbers and answer the result.

+ aNumber
     Sum two numbers and answer the result.

- aNumber
     Subtract aNumber from the receiver and answer the result.

/ aNumber
     Divide two numbers and answer the result.

// aNumber
     Answer the integer quotient after dividing the receiver by aNumber
     with truncation towards negative infinity.

\\ aNumber
     Answer the remainder after integer division the receiver by aNumber
     with truncation towards negative infinity.



File: gst-base.info,  Node: ScaledDecimal-coercion,  Next: ScaledDecimal-comparing,  Prev: ScaledDecimal-arithmetic,  Up: ScaledDecimal

1.138.4 ScaledDecimal: coercion
-------------------------------

asFloatD
     Answer the receiver, converted to a FloatD

asFloatE
     Answer the receiver, converted to a FloatE

asFloatQ
     Answer the receiver, converted to a FloatQ

asFraction
     Answer the receiver, converted to a Fraction

ceiling
     Answer the receiver, converted to an Integer and truncated towards
     +infinity.

coerce: aNumber
     Answer aNumber, converted to a ScaledDecimal with the same scale
     as the receiver.

fractionPart
     Answer the fractional part of the receiver.

generality
     Return the receiver's generality

integerPart
     Answer the fractional part of the receiver.

truncated
     Answer the receiver, converted to an Integer and truncated towards
     -infinity.



File: gst-base.info,  Node: ScaledDecimal-comparing,  Next: ScaledDecimal-constants,  Prev: ScaledDecimal-coercion,  Up: ScaledDecimal

1.138.5 ScaledDecimal: comparing
--------------------------------

< aNumber
     Answer whether the receiver is less than arg.

<= aNumber
     Answer whether the receiver is less than or equal to arg.

= arg
     Answer whether the receiver is equal to arg.

> aNumber
     Answer whether the receiver is greater than arg.

>= aNumber
     Answer whether the receiver is greater than or equal to arg.

hash
     Answer an hash value for the receiver.

~= arg
     Answer whether the receiver is not equal arg.



File: gst-base.info,  Node: ScaledDecimal-constants,  Next: ScaledDecimal-printing,  Prev: ScaledDecimal-comparing,  Up: ScaledDecimal

1.138.6 ScaledDecimal: constants
--------------------------------

one
     Answer the receiver's representation of one.

zero
     Answer the receiver's representation of zero.



File: gst-base.info,  Node: ScaledDecimal-printing,  Next: ScaledDecimal-storing,  Prev: ScaledDecimal-constants,  Up: ScaledDecimal

1.138.7 ScaledDecimal: printing
-------------------------------

displayOn: aStream
     Print a representation of the receiver on aStream, intended to be
     directed to a user.  In this particular case, the `scale' part of
     the #printString is not emitted.

printOn: aStream
     Print a representation of the receiver on aStream.



File: gst-base.info,  Node: ScaledDecimal-storing,  Prev: ScaledDecimal-printing,  Up: ScaledDecimal

1.138.8 ScaledDecimal: storing
------------------------------

storeOn: aStream
     Print Smalltalk code that compiles to the receiver on aStream.



File: gst-base.info,  Node: SecurityPolicy,  Next: Semaphore,  Prev: ScaledDecimal,  Up: Base classes

1.139 SecurityPolicy
====================

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Security
     I am the class that represents which operations that could harm
     the system's security are allowed or denied to a particular class.
     If a class does not have a policy, it is allowed everything if it
     is trusted, and denied everything if it is untrusted

* Menu:

* SecurityPolicy-modifying::  (instance)
* SecurityPolicy-querying::  (instance)


File: gst-base.info,  Node: SecurityPolicy-modifying,  Next: SecurityPolicy-querying,  Up: SecurityPolicy

1.139.1 SecurityPolicy: modifying
---------------------------------

addPermission: aPermission
     Not commented.

owner: aClass
     Not commented.

removePermission: aPermission
     Not commented.

withOwner: aClass
     Not commented.



File: gst-base.info,  Node: SecurityPolicy-querying,  Prev: SecurityPolicy-modifying,  Up: SecurityPolicy

1.139.2 SecurityPolicy: querying
--------------------------------

check: aPermission
     Not commented.

implies: aPermission
     Not commented.



File: gst-base.info,  Node: Semaphore,  Next: SequenceableCollection,  Prev: SecurityPolicy,  Up: Base classes

1.140 Semaphore
===============

Defined in namespace Smalltalk
Superclass: LinkedList
Category: Language-Processes
     My instances represent counting semaphores.  I provide methods for
     signalling the semaphore's availability, and methods for waiting
     for its availability.  I also provide some methods for
     implementing critical sections.

* Menu:

* Semaphore class-instance creation::  (class)
* Semaphore-accessing::  (instance)
* Semaphore-builtins::  (instance)
* Semaphore-mutual exclusion::  (instance)
* Semaphore-printing::  (instance)


File: gst-base.info,  Node: Semaphore class-instance creation,  Next: Semaphore-accessing,  Up: Semaphore

1.140.1 Semaphore class: instance creation
------------------------------------------

forMutualExclusion
     Answer a new semaphore with a signal on it. These semaphores are a
     useful shortcut when you use semaphores as critical sections.

new
     Answer a new semaphore



File: gst-base.info,  Node: Semaphore-accessing,  Next: Semaphore-builtins,  Prev: Semaphore class-instance creation,  Up: Semaphore

1.140.2 Semaphore: accessing
----------------------------

name
     Answer a user-friendly name for the receiver

name: aString
     Answer a user-friendly name for the receiver

waitingProcesses
     Answer an Array of processes currently waiting on the receiver.

wouldBlock
     Answer whether waiting on the receiver would suspend the current
     process.



File: gst-base.info,  Node: Semaphore-builtins,  Next: Semaphore-mutual exclusion,  Prev: Semaphore-accessing,  Up: Semaphore

1.140.3 Semaphore: builtins
---------------------------

lock
     Without putting the receiver to sleep, force processes that try to
     wait on the semaphore to block.  Answer whether this was the case
     even before.

"synchronization"
     notify Resume one of the processes that were waiting on the
     semaphore if there were any.  Do not leave a signal on the
     semaphore if no process is waiting.

notifyAll
     Resume all the processes that were waiting on the semaphore if
     there were any.  Do not leave a signal on the semaphore if no
     process is waiting.

signal
     Signal the receiver, resuming a waiting process' if there is one

wait
     Wait for the receiver to be signalled, suspending the executing
     process if it is not yet

     are

waitAfterSignalling: aSemaphore
     Signal aSemaphore then, atomically, wait for the receiver to be
     signalled, suspending the executing process if it is not yet.  This
     is needed to avoid race conditions when the #notify and #notifyAll
     are used before waiting on receiver: otherwise, if a process sends
     any of the two between the time aSemaphore is signaled and the time
     the process starts waiting on the receiver, the notification is
     lost.



File: gst-base.info,  Node: Semaphore-mutual exclusion,  Next: Semaphore-printing,  Prev: Semaphore-builtins,  Up: Semaphore

1.140.4 Semaphore: mutual exclusion
-----------------------------------

critical: aBlock
     Wait for the receiver to be free, execute aBlock and signal the
     receiver again. Return the result of evaluating aBlock.



File: gst-base.info,  Node: Semaphore-printing,  Prev: Semaphore-mutual exclusion,  Up: Semaphore

1.140.5 Semaphore: printing
---------------------------

printOn: aStream
     Print a human-readable represention of the receiver on aStream.



File: gst-base.info,  Node: SequenceableCollection,  Next: Set,  Prev: Semaphore,  Up: Base classes

1.141 SequenceableCollection
============================

Defined in namespace Smalltalk
Superclass: Collection
Category: Collections-Sequenceable
     My instances represent collections of objects that are ordered.  I
     provide some access and manipulation methods.

* Menu:

* SequenceableCollection class-instance creation::  (class)
* SequenceableCollection-basic::  (instance)
* SequenceableCollection-copying SequenceableCollections::  (instance)
* SequenceableCollection-enumerating::  (instance)
* SequenceableCollection-replacing items::  (instance)
* SequenceableCollection-testing::  (instance)


File: gst-base.info,  Node: SequenceableCollection class-instance creation,  Next: SequenceableCollection-basic,  Up: SequenceableCollection

1.141.1 SequenceableCollection class: instance creation
-------------------------------------------------------

streamContents: aBlock
     Create a ReadWriteStream on an empty instance of the receiver;
     pass the stream to aBlock, then retrieve its contents and answer
     them.



File: gst-base.info,  Node: SequenceableCollection-basic,  Next: SequenceableCollection-copying SequenceableCollections,  Prev: SequenceableCollection class-instance creation,  Up: SequenceableCollection

1.141.2 SequenceableCollection: basic
-------------------------------------

after: oldObject
     Return the element after oldObject.  Error if oldObject not found
     or if no following object is available

at: anIndex ifAbsent: aBlock
     Answer the anIndex-th item of the collection, or evaluate aBlock
     and answer the result if the index is out of range

atAll: aCollection put: anObject
     Put anObject at every index contained in aCollection

atAllPut: anObject
     Put anObject at every index in the receiver

before: oldObject
     Return the element before oldObject.  Error if oldObject not found
     or if no preceding object is available

first
     Answer the first item in the receiver

fourth
     Answer the fourth item in the receiver

identityIncludes: anObject
     Answer whether we include the anObject object

identityIndexOf: anElement
     Answer the index of the first occurrence of an object identical to
     anElement in the receiver. Answer 0 if no item is found

identityIndexOf: anElement ifAbsent: exceptionBlock
     Answer the index of the first occurrence of an object identical to
     anElement in the receiver. Invoke exceptionBlock and answer its
     result if no item is found

identityIndexOf: anElement startingAt: anIndex
     Answer the first index > anIndex which contains an object identical
     to anElement. Answer 0 if no item is found

identityIndexOf: anObject startingAt: anIndex ifAbsent: exceptionBlock
     Answer the first index > anIndex which contains an object exactly
     identical to anObject.  Invoke exceptionBlock and answer its
     result if no item is found

includes: anObject
     Answer whether we include anObject

indexOf: anElement
     Answer the index of the first occurrence of anElement in the
     receiver.  Answer 0 if no item is found

indexOf: anElement ifAbsent: exceptionBlock
     Answer the index of the first occurrence of anElement in the
     receiver.  Invoke exceptionBlock and answer its result if no item
     is found

indexOf: anElement startingAt: anIndex
     Answer the first index > anIndex which contains anElement.  Answer
     0 if no item is found

indexOf: anElement startingAt: anIndex ifAbsent: exceptionBlock
     Answer the first index > anIndex which contains anElement.  Invoke
     exceptionBlock and answer its result if no item is found

indexOfSubCollection: aSubCollection
     Answer the first index > anIndex at which starts a sequence of
     items matching aSubCollection. Answer 0 if no such sequence is
     found.

indexOfSubCollection: aSubCollection ifAbsent: exceptionBlock
     Answer the first index > anIndex at which starts a sequence of
     items matching aSubCollection. Answer 0 if no such sequence is
     found.

indexOfSubCollection: aSubCollection startingAt: anIndex
     Answer the first index > anIndex at which starts a sequence of
     items matching aSubCollection. Answer 0 if no such sequence is
     found.

indexOfSubCollection: aSubCollection startingAt: anIndex ifAbsent: exceptionBlock
     Answer the first index > anIndex at which starts a sequence of
     items matching aSubCollection.  Invoke exceptionBlock and answer
     its result if no such sequence is found

last
     Answer the last item in the receiver

second
     Answer the second item in the receiver

third
     Answer the third item in the receiver



File: gst-base.info,  Node: SequenceableCollection-copying SequenceableCollections,  Next: SequenceableCollection-enumerating,  Prev: SequenceableCollection-basic,  Up: SequenceableCollection

1.141.3 SequenceableCollection: copying SequenceableCollections
---------------------------------------------------------------

, aSequenceableCollection
     Append aSequenceableCollection at the end of the receiver (using
     #add:), and answer a new collection

copyFrom: start
     Answer a new collection containing all the items in the receiver
     from the start-th.

copyFrom: start to: stop
     Answer a new collection containing all the items in the receiver
     from the start-th and to the stop-th

copyReplaceAll: oldSubCollection with: newSubCollection
     Answer a new collection in which all the sequences matching
     oldSubCollection are replaced with newSubCollection

copyReplaceFrom: start to: stop with: replacementCollection
     Answer a new collection of the same class as the receiver that
     contains the same elements as the receiver, in the same order,
     except for elements from index `start' to index `stop'.  If start
     < stop, these are replaced by the contents of the
     replacementCollection.  Instead, If start = (stop + 1), like in
     `copyReplaceFrom: 4 to: 3 with: anArray', then every element of
     the receiver will be present in the answered copy; the operation
     will be an append if stop is equal to the size of the receiver or,
     if it is not, an insert before index `start'.

copyReplaceFrom: start to: stop withObject: anObject
     Answer a new collection of the same class as the receiver that
     contains the same elements as the receiver, in the same order,
     except for elements from index `start' to index `stop'.  If start
     < stop, these are replaced by stop-start+1 copies of anObject.
     Instead, If start = (stop + 1), then every element of the receiver
     will be present in the answered copy; the operation will be an
     append if stop is equal to the size of the receiver or, if it is
     not, an insert before index `start'.

copyUpTo: anObject
     Answer a new collection holding all the elements of the receiver
     from the first up to the first occurrence of anObject, excluded.



File: gst-base.info,  Node: SequenceableCollection-enumerating,  Next: SequenceableCollection-replacing items,  Prev: SequenceableCollection-copying SequenceableCollections,  Up: SequenceableCollection

1.141.4 SequenceableCollection: enumerating
-------------------------------------------

anyOne
     Answer an unspecified element of the collection.

do: aBlock
     Evaluate aBlock for all the elements in the sequenceable collection

do: aBlock separatedBy: sepBlock
     Evaluate aBlock for all the elements in the sequenceable
     collection.  Between each element, evaluate sepBlock without
     parameters.

doWithIndex: aBlock
     Evaluate aBlock for all the elements in the sequenceable
     collection, passing the index of each element as the second
     parameter.  This method is mantained for backwards compatibility
     and is not mandated by the ANSI standard; use #keysAndValuesDo:

findFirst: aBlock
     Returns the index of the first element of the sequenceable
     collection for which aBlock returns true, or 0 if none

findLast: aBlock
     Returns the index of the last element of the sequenceable
     collection for which aBlock returns true, or 0 if none does

fold: binaryBlock
     First, pass to binaryBlock the first and second elements of the
     receiver; for each subsequent element, pass the result of the
     previous evaluation and an element. Answer the result of the last
     invocation, or the first element if the collection has size 1.
     Fail if the collection is empty.

from: startIndex to: stopIndex do: aBlock
     Evaluate aBlock for all the elements in the sequenceable
     collection whose indices are in the range index to stopIndex

from: startIndex to: stopIndex doWithIndex: aBlock
     Evaluate aBlock for all the elements in the sequenceable
     collection whose indices are in the range index to stopIndex,
     passing the index of each element as the second parameter.  This
     method is mantained for backwards compatibility and is not
     mandated by the ANSI standard; use #from:to:keysAndValuesDo:

from: startIndex to: stopIndex keysAndValuesDo: aBlock
     Evaluate aBlock for all the elements in the sequenceable
     collection whose indices are in the range index to stopIndex,
     passing the index of each element as the first parameter and the
     element as the second.

keysAndValuesDo: aBlock
     Evaluate aBlock for all the elements in the sequenceable
     collection, passing the index of each element as the first
     parameter and the element as the second.

readStream
     Answer a ReadStream streaming on the receiver

readWriteStream
     Answer a ReadWriteStream which streams on the receiver

reverse
     Answer the receivers' contents in reverse order

reverseDo: aBlock
     Evaluate aBlock for all elements in the sequenceable collection,
     from the last to the first.

with: aSequenceableCollection collect: aBlock
     Evaluate aBlock for each pair of elements took respectively from
     the re- ceiver and from aSequenceableCollection; answer a
     collection of the same kind of the receiver, made with the block's
     return values. Fail if the receiver has not the same size as
     aSequenceableCollection.

with: aSequenceableCollection do: aBlock
     Evaluate aBlock for each pair of elements took respectively from
     the re- ceiver and from aSequenceableCollection. Fail if the
     receiver has not the same size as aSequenceableCollection.

writeStream
     Answer a WriteStream streaming on the receiver



File: gst-base.info,  Node: SequenceableCollection-replacing items,  Next: SequenceableCollection-testing,  Prev: SequenceableCollection-enumerating,  Up: SequenceableCollection

1.141.5 SequenceableCollection: replacing items
-----------------------------------------------

replaceAll: anObject with: anotherObject
     In the receiver, replace every occurrence of anObject with
     anotherObject.

replaceFrom: start to: stop with: replacementCollection
     Replace the items from start to stop with replacementCollection's
     items from 1 to stop-start+1 (in unexpected order if the
     collection is not sequenceable).

replaceFrom: start to: stop with: replacementCollection startingAt: repStart
     Replace the items from start to stop with replacementCollection's
     items from repStart to repStart+stop-start

replaceFrom: anIndex to: stopIndex withObject: replacementObject
     Replace every item from start to stop with replacementObject.



File: gst-base.info,  Node: SequenceableCollection-testing,  Prev: SequenceableCollection-replacing items,  Up: SequenceableCollection

1.141.6 SequenceableCollection: testing
---------------------------------------

= aCollection
     Answer whether the receiver's items match those in aCollection

hash
     Answer an hash value for the receiver

inspect
     Print all the instance variables and context of the receiver on the
     Transcript



File: gst-base.info,  Node: Set,  Next: SharedQueue,  Prev: SequenceableCollection,  Up: Base classes

1.142 Set
=========

Defined in namespace Smalltalk
Superclass: HashedCollection
Category: Collections-Unordered
     I am the typical set object; I also known how to do arithmetic on
     my instances.

* Menu:

* Set-arithmetic::  (instance)
* Set-awful ST-80 compatibility hacks::  (instance)
* Set-comparing::  (instance)


File: gst-base.info,  Node: Set-arithmetic,  Next: Set-awful ST-80 compatibility hacks,  Up: Set

1.142.1 Set: arithmetic
-----------------------

& aSet
     Compute the set intersection of the receiver and aSet.

+ aSet
     Compute the set union of the receiver and aSet.

- aSet
     Compute the set difference of the receiver and aSet.



File: gst-base.info,  Node: Set-awful ST-80 compatibility hacks,  Next: Set-comparing,  Prev: Set-arithmetic,  Up: Set

1.142.2 Set: awful ST-80 compatibility hacks
--------------------------------------------

findObjectIndex: object
     Tries to see if anObject exists as an indexed variable. As soon as
     nil or anObject is found, the index of that slot is answered



File: gst-base.info,  Node: Set-comparing,  Prev: Set-awful ST-80 compatibility hacks,  Up: Set

1.142.3 Set: comparing
----------------------

< aSet
     Answer whether the receiver is a strict subset of aSet

<= aSet
     Answer whether the receiver is a subset of aSet

> aSet
     Answer whether the receiver is a strict superset of aSet

>= aSet
     Answer whether the receiver is a superset of aSet



File: gst-base.info,  Node: SharedQueue,  Next: Signal,  Prev: Set,  Up: Base classes

1.143 SharedQueue
=================

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Processes
     My instances provide a guaranteed safe mechanism to allow for
     communication between processes.  All access to the underlying
     data structures is controlled with critical sections so that
     things proceed smoothly.

* Menu:

* SharedQueue class-instance creation::  (class)
* SharedQueue-accessing::  (instance)


File: gst-base.info,  Node: SharedQueue class-instance creation,  Next: SharedQueue-accessing,  Up: SharedQueue

1.143.1 SharedQueue class: instance creation
--------------------------------------------

new
     Create a new instance of the receiver

sortBlock: sortBlock
     Create a new instance of the receiver which implements a priority
     queue with the given sort block



File: gst-base.info,  Node: SharedQueue-accessing,  Prev: SharedQueue class-instance creation,  Up: SharedQueue

1.143.2 SharedQueue: accessing
------------------------------

isEmpty
     Answer whether there is an object on the queue

next
     Wait for an object to be on the queue, then remove it and answer it

nextPut: value
     Put value on the queue and answer it

peek
     Wait for an object to be on the queue if necessary, then answer the
     same object that #next would answer without removing it.



File: gst-base.info,  Node: Signal,  Next: SingletonProxy,  Prev: SharedQueue,  Up: Base classes

1.144 Signal
============

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Exceptions
     My instances describe an exception that has happened, and are
     passed to exception handlers. Apart from containing information on
     the generated exception and its arguments, they contain methods
     that allow you to resume execution, leave the #on:do:... snippet,
     and pass the exception to an handler with a lower priority.

* Menu:

* Signal-accessing::  (instance)
* Signal-exception handling::  (instance)


File: gst-base.info,  Node: Signal-accessing,  Next: Signal-exception handling,  Up: Signal

1.144.1 Signal: accessing
-------------------------

argument
     Answer the first argument of the receiver

argumentCount
     Answer how many arguments the receiver has

arguments
     Answer the arguments of the receiver

basicMessageText
     Answer an exception's message text.  Do not override this method.

description
     Answer the description of the raised exception

exception
     Answer the CoreException that was raised

messageText
     Answer an exception's message text.

messageText: aString
     Set an exception's message text.

tag
     Answer an exception's tag value.  If not specified, it is the same
     as the message text.

tag: anObject
     Set an exception's tag value.  If nil, the tag value will be the
     same as the message text.



File: gst-base.info,  Node: Signal-exception handling,  Prev: Signal-accessing,  Up: Signal

1.144.2 Signal: exception handling
----------------------------------

defaultAction
     Execute the default handler for the raised exception

isNested
     Answer whether the current exception handler is within the scope of
     another handler for the same exception.

isResumable
     Answer whether the exception that instantiated the receiver is
     resumable.

outer
     Raise the exception that instantiated the receiver, passing the
     same parameters.  If the receiver is resumable and the evaluated
     exception action resumes then the result returned from #outer will
     be the resumption value of the evaluated exception action. If the
     receiver is not resumable or if the exception action does not
     resume then this message will not return, and #outer will be
     equivalent to #pass.

pass
     Yield control to the enclosing exception action for the receiver.
     Similar to #outer, but control does not return to the currently
     active exception handler.

resignalAs: replacementException
     Reinstate all handlers and execute the handler for
     `replacementException'; control does not return to the currently
     active exception handler. The new Signal object that is created
     has the same arguments as the receiver (this might or not be
     correct - if it isn't you can use an idiom such as `sig
     retryUsing: [ replacementException signal ])

resume
     If the exception is resumable, resume the execution of the block
     that raised the exception; the method that was used to signal the
     exception will answer the receiver.  Use this method IF AND ONLY
     IF you know who caused the exception and if it is possible to
     resume it in that particular case

resume: anObject
     If the exception is resumable, resume the execution of the block
     that raised the exception; the method that was used to signal the
     exception will answer anObject.  Use this method IF AND ONLY IF
     you know who caused the exception and if it is possible to resume
     it in that particular case

retry
     Re-execute the receiver of the #on:do: message. All handlers are
     reinstated: watch out, this can easily cause an infinite loop.

retryUsing: aBlock
     Execute aBlock reinstating all handlers, and return its result from
     the #signal method.

return
     Exit the #on:do: snippet, answering nil to its caller.

return: anObject
     Exit the #on:do: snippet, answering anObject to its caller.



File: gst-base.info,  Node: SingletonProxy,  Next: SmallInteger,  Prev: Signal,  Up: Base classes

1.145 SingletonProxy
====================

Defined in namespace Smalltalk
Superclass: AlternativeObjectProxy
Category: Streams-Files
     I am a proxy that stores the class of an object rather than the
     object itself, and pretends that a registered instance (which most
     likely is a singleton instance of the stored class) was stored
     instead.

* Menu:

* SingletonProxy class-accessing::  (class)
* SingletonProxy class-instance creation::  (class)
* SingletonProxy-saving and restoring::  (instance)


File: gst-base.info,  Node: SingletonProxy class-accessing,  Next: SingletonProxy class-instance creation,  Up: SingletonProxy

1.145.1 SingletonProxy class: accessing
---------------------------------------

acceptUsageForClass: aClass
     The receiver was asked to be used as a proxy for the class aClass.
     The registration is fine if the class is actually a singleton.



File: gst-base.info,  Node: SingletonProxy class-instance creation,  Next: SingletonProxy-saving and restoring,  Prev: SingletonProxy class-accessing,  Up: SingletonProxy

1.145.2 SingletonProxy class: instance creation
-----------------------------------------------

on: anObject
     Answer a proxy to be used to save anObject.  The proxy stores the
     class and restores the object by looking into a dictionary of
     class -> singleton objects.



File: gst-base.info,  Node: SingletonProxy-saving and restoring,  Prev: SingletonProxy class-instance creation,  Up: SingletonProxy

1.145.3 SingletonProxy: saving and restoring
--------------------------------------------

object
     Reconstruct the object stored in the proxy and answer it; the
     binaryRepresentationObject is sent the #reconstructOriginalObject
     message, and the resulting object is sent the #postLoad message.



File: gst-base.info,  Node: SmallInteger,  Next: SortedCollection,  Prev: SingletonProxy,  Up: Base classes

1.146 SmallInteger
==================

Defined in namespace Smalltalk
Superclass: Integer
Category: Language-Data types
     I am the integer class of the GNU Smalltalk system.  My instances
     can represent signed 30 bit integers and are as efficient as
     possible.

* Menu:

* SmallInteger class-getting limits::  (class)
* SmallInteger class-testing::  (class)
* SmallInteger-bit arithmetic::  (instance)
* SmallInteger-built ins::  (instance)
* SmallInteger-builtins::  (instance)
* SmallInteger-coercion methods::  (instance)
* SmallInteger-testing functionality::  (instance)


File: gst-base.info,  Node: SmallInteger class-getting limits,  Next: SmallInteger class-testing,  Up: SmallInteger

1.146.1 SmallInteger class: getting limits
------------------------------------------

bits
     Answer the number of bits (excluding the sign) that can be
     represented directly in an object pointer

largest
     Answer the largest integer represented directly in an object
     pointer

smallest
     Answer the smallest integer represented directly in an object
     pointer



File: gst-base.info,  Node: SmallInteger class-testing,  Next: SmallInteger-bit arithmetic,  Prev: SmallInteger class-getting limits,  Up: SmallInteger

1.146.2 SmallInteger class: testing
-----------------------------------

isIdentity
     Answer whether x = y implies x == y for instances of the receiver



File: gst-base.info,  Node: SmallInteger-bit arithmetic,  Next: SmallInteger-built ins,  Prev: SmallInteger class-testing,  Up: SmallInteger

1.146.3 SmallInteger: bit arithmetic
------------------------------------

highBit
     Return the index of the highest order 1 bit of the receiver



File: gst-base.info,  Node: SmallInteger-built ins,  Next: SmallInteger-builtins,  Prev: SmallInteger-bit arithmetic,  Up: SmallInteger

1.146.4 SmallInteger: built ins
-------------------------------

* arg
     Multiply the receiver and arg and answer another Number

+ arg
     Sum the receiver and arg and answer another Number

- arg
     Subtract arg from the receiver and answer another Number

/ arg
     Divide the receiver by arg and answer another Integer or Fraction

// arg
     Dividing receiver by arg (with truncation towards -infinity) and
     answer the result

< arg
     Answer whether the receiver is less than arg

<= arg
     Answer whether the receiver is less than or equal to arg

= arg
     Answer whether the receiver is equal to arg

== arg
     Answer whether the receiver is the same object as arg

> arg
     Answer whether the receiver is greater than arg

>= arg
     Answer whether the receiver is greater than or equal to arg

\\ arg
     Calculate the remainder of dividing receiver by arg (with
     truncation towards -infinity) and answer it

asFloatD
     Convert the receiver to a FloatD, answer the result

asFloatE
     Convert the receiver to a FloatE, answer the result

asFloatQ
     Convert the receiver to a FloatQ, answer the result

asObject
     Answer the object whose index is in the receiver, nil if there is
     a free object, fail if index is out of bounds

asObjectNoFail
     Answer the object whose index is in the receiver, or nil if no
     object is found at that index

bitAnd: arg
     Do a bitwise AND between the receiver and arg, answer the result

bitOr: arg
     Do a bitwise OR between the receiver and arg, answer the result

bitShift: arg
     Shift the receiver by arg places to the left if arg > 0, by arg
     places to the right if arg < 0, answer another Number

bitXor: arg
     Do a bitwise XOR between the receiver and arg, answer the result

nextValidOop
     Answer the index of the first non-free OOP after the receiver.
     This is used internally; it is placed here to avoid polluting
     Object.

quo: arg
     Dividing receiver by arg (with truncation towards zero) and answer
     the result

~= arg
     Answer whether the receiver is not equal to arg

~~ arg
     Answer whether the receiver is not the same object as arg



File: gst-base.info,  Node: SmallInteger-builtins,  Next: SmallInteger-coercion methods,  Prev: SmallInteger-built ins,  Up: SmallInteger

1.146.5 SmallInteger: builtins
------------------------------

at: anIndex
     Answer the index-th indexed instance variable of the receiver.
     This method always fails.

at: anIndex put: value
     Store value in the index-th indexed instance variable of the
     receiver This method always fails.

basicAt: anIndex
     Answer the index-th indexed instance variable of the receiver.
     This method always fails.

basicAt: anIndex put: value
     Store value in the index-th indexed instance variable of the
     receiver This method always fails.

scramble
     Answer the receiver with its bits mixed and matched.



File: gst-base.info,  Node: SmallInteger-coercion methods,  Next: SmallInteger-testing functionality,  Prev: SmallInteger-builtins,  Up: SmallInteger

1.146.6 SmallInteger: coercion methods
--------------------------------------

generality
     Return the receiver's generality

unity
     Coerce 1 to the receiver's class

zero
     Coerce 0 to the receiver's class



File: gst-base.info,  Node: SmallInteger-testing functionality,  Prev: SmallInteger-coercion methods,  Up: SmallInteger

1.146.7 SmallInteger: testing functionality
-------------------------------------------

isSmallInteger
     Answer `true'.



File: gst-base.info,  Node: SortedCollection,  Next: Stream,  Prev: SmallInteger,  Up: Base classes

1.147 SortedCollection
======================

Defined in namespace Smalltalk
Superclass: OrderedCollection
Category: Collections-Sequenceable
     I am a collection of objects, stored and accessed according to some
     sorting criteria.  I store things using heap sort and quick sort.
     My instances have a comparison block associated with them; this
     block takes two arguments and is a predicate which returns true if
     the first argument should be sorted earlier than the second.  The
     default block is [ :a :b | a <= b ], but I will accept any block
     that conforms to the above criteria - actually any object which
     responds to #value:value:.

* Menu:

* SortedCollection class-hacking::  (class)
* SortedCollection class-instance creation::  (class)
* SortedCollection-basic::  (instance)
* SortedCollection-copying::  (instance)
* SortedCollection-disabled::  (instance)
* SortedCollection-enumerating::  (instance)
* SortedCollection-saving and loading::  (instance)
* SortedCollection-searching::  (instance)


File: gst-base.info,  Node: SortedCollection class-hacking,  Next: SortedCollection class-instance creation,  Up: SortedCollection

1.147.1 SortedCollection class: hacking
---------------------------------------

defaultSortBlock
     Answer a default sort block for the receiver.



File: gst-base.info,  Node: SortedCollection class-instance creation,  Next: SortedCollection-basic,  Prev: SortedCollection class-hacking,  Up: SortedCollection

1.147.2 SortedCollection class: instance creation
-------------------------------------------------

new
     Answer a new collection with a default size and sort block

new: aSize
     Answer a new collection with a default sort block and the given
     size

sortBlock: aSortBlock
     Answer a new collection with a default size and the given sort
     block



File: gst-base.info,  Node: SortedCollection-basic,  Next: SortedCollection-copying,  Prev: SortedCollection class-instance creation,  Up: SortedCollection

1.147.3 SortedCollection: basic
-------------------------------

last
     Answer the last item of the receiver

removeLast
     Remove an object from the end of the receiver. Fail if the receiver
     is empty

sortBlock
     Answer the receiver's sort criteria

sortBlock: aSortBlock
     Change the sort criteria for a sorted collection, resort the
     elements of the collection, and return it.



File: gst-base.info,  Node: SortedCollection-copying,  Next: SortedCollection-disabled,  Prev: SortedCollection-basic,  Up: SortedCollection

1.147.4 SortedCollection: copying
---------------------------------

copyEmpty: newSize
     Answer an empty copy of the receiver, with the same sort block as
     the receiver



File: gst-base.info,  Node: SortedCollection-disabled,  Next: SortedCollection-enumerating,  Prev: SortedCollection-copying,  Up: SortedCollection

1.147.5 SortedCollection: disabled
----------------------------------

add: anObject afterIndex: i
     This method should not be called for instances of this class.

addAll: aCollection afterIndex: i
     This method should not be called for instances of this class.

addAllFirst: aCollection
     This method should not be called for instances of this class.

addAllLast: aCollection
     This method should not be called for instances of this class.

addFirst: anObject
     This method should not be called for instances of this class.

addLast: anObject
     This method should not be called for instances of this class.

at: index put: anObject
     This method should not be called for instances of this class.



File: gst-base.info,  Node: SortedCollection-enumerating,  Next: SortedCollection-saving and loading,  Prev: SortedCollection-disabled,  Up: SortedCollection

1.147.6 SortedCollection: enumerating
-------------------------------------

beConsistent
     Prepare the receiver to be walked through with #do: or another
     enumeration method.



File: gst-base.info,  Node: SortedCollection-saving and loading,  Next: SortedCollection-searching,  Prev: SortedCollection-enumerating,  Up: SortedCollection

1.147.7 SortedCollection: saving and loading
--------------------------------------------

postLoad
     Restore the default sortBlock if it is nil

preStore
     Store the default sortBlock as nil



File: gst-base.info,  Node: SortedCollection-searching,  Prev: SortedCollection-saving and loading,  Up: SortedCollection

1.147.8 SortedCollection: searching
-----------------------------------

includes: anObject
     Private - Answer whether the receiver includes an item which is
     equal to anObject

indexOf: anObject startingAt: index ifAbsent: aBlock
     Answer the first index > anIndex which contains anElement.  Invoke
     exceptionBlock and answer its result if no item is found

occurrencesOf: anObject
     Answer how many occurrences of anObject can be found in the
     receiver



File: gst-base.info,  Node: Stream,  Next: String,  Prev: SortedCollection,  Up: Base classes

1.148 Stream
============

Defined in namespace Smalltalk
Superclass: Object
Category: Streams
     I am an abstract class that provides interruptable sequential
     access to objects.  I can return successive objects from a source,
     or accept successive objects and store them sequentially on a
     sink.  I provide some simple iteration over the contents of one of
     my instances, and provide for writing collections sequentially.

* Menu:

* Stream-accessing-reading::  (instance)
* Stream-accessing-writing::  (instance)
* Stream-basic::  (instance)
* Stream-character writing::  (instance)
* Stream-enumerating::  (instance)
* Stream-filing out::  (instance)
* Stream-positioning::  (instance)
* Stream-printing::  (instance)
* Stream-providing consistent protocols::  (instance)
* Stream-storing::  (instance)
* Stream-testing::  (instance)


File: gst-base.info,  Node: Stream-accessing-reading,  Next: Stream-accessing-writing,  Up: Stream

1.148.1 Stream: accessing-reading
---------------------------------

contents
     Answer the whole contents of the receiver, from the next object to
     the last

next
     Return the next object in the receiver

next: anInteger
     Return the next anInteger objects in the receiver

nextAvailable: anInteger
     Return up to anInteger objects in the receiver, stopping if the
     end of the stream is reached

nextLine
     Returns a collection of the same type that the stream accesses,
     containing the next line up to the next new-line character.
     Returns the entire rest of the stream's contents if no new-line
     character is found.

nextMatchFor: anObject
     Answer whether the next object is equal to anObject. Even if it
     does not, anObject is lost

splitAt: anObject
     Answer an OrderedCollection of parts of the receiver. A new
     (possibly empty) part starts at the start of the receiver, or
     after every occurrence of an object which is equal to anObject (as
     compared by #=).

upTo: anObject
     Returns a collection of the same type that the stream accesses, up
     to but not including the object anObject.  Returns the entire rest
     of the stream's contents if anObject is not present.

upToAll: aCollection
     If there is a sequence of objects remaining in the stream that is
     equal to the sequence in aCollection, set the stream position just
     past that sequence and answer the elements up to, but not
     including, the sequence. Else, set the stream position to its end
     and answer all the remaining elements.

upToEnd
     Answer every item in the collection on which the receiver is
     streaming, from the next one to the last



File: gst-base.info,  Node: Stream-accessing-writing,  Next: Stream-basic,  Prev: Stream-accessing-reading,  Up: Stream

1.148.2 Stream: accessing-writing
---------------------------------

next: anInteger put: anObject
     Write anInteger copies of anObject to the receiver

next: n putAll: aCollection startingAt: start
     Write n objects to the stream, reading them from aCollection and
     starting at the start-th item.

nextPut: anObject
     Write anObject to the receiver

nextPutAll: aCollection
     Write all the objects in aCollection to the receiver



File: gst-base.info,  Node: Stream-basic,  Next: Stream-character writing,  Prev: Stream-accessing-writing,  Up: Stream

1.148.3 Stream: basic
---------------------

species
     Answer `Array'.



File: gst-base.info,  Node: Stream-character writing,  Next: Stream-enumerating,  Prev: Stream-basic,  Up: Stream

1.148.4 Stream: character writing
---------------------------------

cr
     Store a cr on the receiver

crTab
     Store a cr and a tab on the receiver

nl
     Store a new line on the receiver

nlTab
     Store a new line and a tab on the receiver

space
     Store a space on the receiver

space: n
     Store n spaces on the receiver

tab
     Store a tab on the receiver

tab: n
     Store n tabs on the receiver



File: gst-base.info,  Node: Stream-enumerating,  Next: Stream-filing out,  Prev: Stream-character writing,  Up: Stream

1.148.5 Stream: enumerating
---------------------------

do: aBlock
     Evaluate aBlock once for every object in the receiver

linesDo: aBlock
     Evaluate aBlock once for every line in the receiver (assuming the
     receiver is streaming on Characters).



File: gst-base.info,  Node: Stream-filing out,  Next: Stream-positioning,  Prev: Stream-enumerating,  Up: Stream

1.148.6 Stream: filing out
--------------------------

fileOut: aClass
     File out aClass on the receiver. If aClass is not a metaclass,
     file out class and instance methods; if aClass is a metaclass,
     file out only the class methods



File: gst-base.info,  Node: Stream-positioning,  Next: Stream-printing,  Prev: Stream-filing out,  Up: Stream

1.148.7 Stream: positioning
---------------------------

skip: anInteger
     Move the position forwards by anInteger places

skipTo: anObject
     Move the current position to after the next occurrence of anObject
     and return true if anObject was found.  If anObject doesn't exist,
     the pointer is atEnd, and false is returned.

skipToAll: aCollection
     If there is a sequence of objects remaining in the stream that is
     equal to the sequence in aCollection, set the stream position just
     past that sequence and answer true. Else, set the stream position
     to its end and answer false.



File: gst-base.info,  Node: Stream-printing,  Next: Stream-providing consistent protocols,  Prev: Stream-positioning,  Up: Stream

1.148.8 Stream: printing
------------------------

<< anObject
     This method is a short-cut for #display:; it prints anObject on the
     receiver by sending displayOn: to anObject. This method is provided
     so that you can use cascading and obtain better-looking code

display: anObject
     Print anObject on the receiver by sending displayOn: to anObject.
     This method is provided so that you can use cascading and obtain
     better-looking code

print: anObject
     Print anObject on the receiver by sending printOn: to anObject.
     This method is provided so that you can use cascading and obtain
     better-looking code



File: gst-base.info,  Node: Stream-providing consistent protocols,  Next: Stream-storing,  Prev: Stream-printing,  Up: Stream

1.148.9 Stream: providing consistent protocols
----------------------------------------------

close
     Do nothing. This is provided for consistency with file streams

flush
     Do nothing. This is provided for consistency with file streams



File: gst-base.info,  Node: Stream-storing,  Next: Stream-testing,  Prev: Stream-providing consistent protocols,  Up: Stream

1.148.10 Stream: storing
------------------------

store: anObject
     Print Smalltalk code compiling to anObject on the receiver, by
     sending storeOn: to anObject. This method is provided so that you
     can use cascading and obtain better-looking code



File: gst-base.info,  Node: Stream-testing,  Prev: Stream-storing,  Up: Stream

1.148.11 Stream: testing
------------------------

atEnd
     Answer whether the stream has got to an end

isExternalStream
     Answer whether the receiver streams on a file or socket.  By
     default, answer false.



File: gst-base.info,  Node: String,  Next: Symbol,  Prev: Stream,  Up: Base classes

1.149 String
============

Defined in namespace Smalltalk
Superclass: CharacterArray
Category: Language-Data types
     My instances represent ASCII string data types.  Being a very
     common case, they are particularly optimized.

* Menu:

* String class-basic::  (class)
* String class-instance creation::  (class)
* String-built ins::  (instance)
* String-converting::  (instance)
* String-storing::  (instance)
* String-testing functionality::  (instance)
* String-useful functionality::  (instance)


File: gst-base.info,  Node: String class-basic,  Next: String class-instance creation,  Up: String

1.149.1 String class: basic
---------------------------

, aString
     Answer a new instance of an ArrayedCollection containing all the
     elements in the receiver, followed by all the elements in
     aSequenceableCollection

= aString
     Answer whether the receiver's items match those in aCollection



File: gst-base.info,  Node: String class-instance creation,  Next: String-built ins,  Prev: String class-basic,  Up: String

1.149.2 String class: instance creation
---------------------------------------

fromCData: aCObject
     Answer a String containing the bytes starting at the location
     pointed to by aCObject, up to the first NUL character.

fromCData: aCObject size: anInteger
     Answer a String containing anInteger bytes starting at the
     location pointed to by aCObject



File: gst-base.info,  Node: String-built ins,  Next: String-converting,  Prev: String class-instance creation,  Up: String

1.149.3 String: built ins
-------------------------

asCData: aCType
     Convert the receiver to a CObject with the given type

at: index
     Answer the index-th character of the receiver.

at: index put: value
     Change the index-th character of the receiver.

basicAt: index
     Answer the index-th character of the receiver. This method must
     not be overridden; override at: instead. String overrides it so
     that it looks like it contains character objects even though it
     contains bytes

basicAt: index put: value
     Change the index-th character of the receiver. This method must
     not be overridden; override at: instead. String overrides it so
     that it looks like it contains character objects even though it
     contains bytes

hash
     Answer an hash value for the receiver

primReplaceFrom: start to: stop with: replacementString
     startingAt: replaceStart Private - Replace the characters from
     start to stop with new characters contained in replacementString
     (which, actually, can be any variable byte class, starting at the
     replaceStart location of replacementString

replaceFrom: start to: stop with: aString startingAt: replaceStart
     Replace the characters from start to stop with new characters whose
     ASCII codes are contained in aString, starting at the replaceStart
     location of aString

replaceFrom: start to: stop withByteArray: byteArray startingAt: replaceStart
     Replace the characters from start to stop with new characters whose
     ASCII codes are contained in byteArray, starting at the
     replaceStart location of byteArray

similarityTo: aString
     Answer a number that denotes the similarity between aString and
     the receiver.  0 indicates equality, negative numbers indicate
     some difference.  Implemented as a primitive for speed.

size
     Answer the size of the receiver



File: gst-base.info,  Node: String-converting,  Next: String-storing,  Prev: String-built ins,  Up: String

1.149.4 String: converting
--------------------------

asByteArray
     Return the receiver, converted to a ByteArray of ASCII values

asString
     But I already am a String!  Really!

asSymbol
     Returns the symbol corresponding to the receiver



File: gst-base.info,  Node: String-storing,  Next: String-testing functionality,  Prev: String-converting,  Up: String

1.149.5 String: storing
-----------------------

storeOn: aStream
     Print Smalltalk code compiling to the receiver on aStream



File: gst-base.info,  Node: String-testing functionality,  Next: String-useful functionality,  Prev: String-storing,  Up: String

1.149.6 String: testing functionality
-------------------------------------

isString
     Answer `true'.



File: gst-base.info,  Node: String-useful functionality,  Prev: String-testing functionality,  Up: String

1.149.7 String: useful functionality
------------------------------------

linesDo: aBlock
     Send 'aBlock' a substring of the receiver for each newline
     delimited line in the receiver



File: gst-base.info,  Node: Symbol,  Next: SymLink,  Prev: String,  Up: Base classes

1.150 Symbol
============

Defined in namespace Smalltalk
Superclass: String
Category: Language-Implementation
     My instances are unique throughout the Smalltalk system.  My
     instances behave for the most part like strings, except that they
     print differently, and I guarantee that any two instances that
     have the same printed representation are in fact the same instance.

* Menu:

* Symbol class-built ins::  (class)
* Symbol class-instance creation::  (class)
* Symbol class-symbol table::  (class)
* Symbol-basic::  (instance)
* Symbol-built ins::  (instance)
* Symbol-converting::  (instance)
* Symbol-misc::  (instance)
* Symbol-storing::  (instance)
* Symbol-testing::  (instance)
* Symbol-testing functionality::  (instance)


File: gst-base.info,  Node: Symbol class-built ins,  Next: Symbol class-instance creation,  Up: Symbol

1.150.1 Symbol class: built ins
-------------------------------

intern: aString
     Private - Same as 'aString asSymbol'



File: gst-base.info,  Node: Symbol class-instance creation,  Next: Symbol class-symbol table,  Prev: Symbol class-built ins,  Up: Symbol

1.150.2 Symbol class: instance creation
---------------------------------------

internCharacter: aCharacter
     Answer the one-character symbol associated to the given character.

new
     This method should not be called for instances of this class.

new: size
     This method should not be called for instances of this class.

with: element1
     Answer a collection whose only element is element1

with: element1 with: element2
     Answer a collection whose only elements are the parameters in the
     order they were passed

with: element1 with: element2 with: element3
     Answer a collection whose only elements are the parameters in the
     order they were passed

with: element1 with: element2 with: element3 with: element4
     Answer a collection whose only elements are the parameters in the
     order they were passed

with: element1 with: element2 with: element3 with: element4 with: element5
     Answer a collection whose only elements are the parameters in the
     order they were passed



File: gst-base.info,  Node: Symbol class-symbol table,  Next: Symbol-basic,  Prev: Symbol class-instance creation,  Up: Symbol

1.150.3 Symbol class: symbol table
----------------------------------

hasInterned: aString ifTrue: aBlock
     If aString has not been interned yet, answer false.  Else, pass the
     interned version to aBlock and answer true.  Note that this works
     because String>>#hash calculates the same hash value used by the
     VM when interning strings into the SymbolTable.  Changing one of
     the hashing methods without changing the other will break this
     method.

isSymbolString: aString
     Answer whether aString has already been interned. Note that this
     works because String>>#hash calculates the same hash value used by
     the VM when interning strings into the SymbolTable.  Changing one
     of the hashing methods without changing the other will break this
     method.

     calculates

rebuildTable
     Rebuild the SymbolTable, thereby garbage-collecting unreferenced
     Symbols.  While this process is done, preemption is disabled
     because it is not acceptable to leave the SymbolTable in a
     partially updated state.  Note that this works because
     String>>#hash calculates the same hash value used by the VM when
     interning strings into the SymbolTable.  Changing one of the
     hashing methods without changing the other will break this method.



File: gst-base.info,  Node: Symbol-basic,  Next: Symbol-built ins,  Prev: Symbol class-symbol table,  Up: Symbol

1.150.4 Symbol: basic
---------------------

deepCopy
     Returns a deep copy of the receiver. As Symbols are identity
     objects, we actually return the receiver itself.

keywords
     Answer an array of keywords that compose the receiver, which is
     supposed to be a valid message name (#+, #not, #printOn:,
     #ifTrue:ifFalse:, etc.)

numArgs
     Answer the number of arguments supported by the receiver, which is
     supposed to be a valid message name (#+, #not, #printOn:,
     #ifTrue:ifFalse:, etc.)

shallowCopy
     Returns a deep copy of the receiver. As Symbols are identity
     objects, we actually return the receiver itself.



File: gst-base.info,  Node: Symbol-built ins,  Next: Symbol-converting,  Prev: Symbol-basic,  Up: Symbol

1.150.5 Symbol: built ins
-------------------------

= aSymbol
     Answer whether the receiver and aSymbol are the same object

hash
     Answer an hash value for the receiver. Symbols are optimized for
     speed



File: gst-base.info,  Node: Symbol-converting,  Next: Symbol-misc,  Prev: Symbol-built ins,  Up: Symbol

1.150.6 Symbol: converting
--------------------------

asString
     Answer a String with the same characters as the receiver

asSymbol
     But we are already a Symbol, and furthermore, Symbols are identity
     objects!  So answer the receiver.



File: gst-base.info,  Node: Symbol-misc,  Next: Symbol-storing,  Prev: Symbol-converting,  Up: Symbol

1.150.7 Symbol: misc
--------------------

species
     Answer `String'.



File: gst-base.info,  Node: Symbol-storing,  Next: Symbol-testing,  Prev: Symbol-misc,  Up: Symbol

1.150.8 Symbol: storing
-----------------------

displayOn: aStream
     Print a represention of the receiver on aStream. For most objects
     this is simply its #printOn: representation, but for strings and
     characters, superfluous dollars or extra pairs of quotes are
     stripped.

displayString
     Answer a String representing the receiver. For most objects this
     is simply its #printString, but for strings and characters,
     superfluous dollars or extra pair of quotes are stripped.

printOn: aStream
     Print a represention of the receiver on aStream.



File: gst-base.info,  Node: Symbol-testing,  Next: Symbol-testing functionality,  Prev: Symbol-storing,  Up: Symbol

1.150.9 Symbol: testing
-----------------------

isSimpleSymbol
     Answer whether the receiver must be represented in quoted-string
     (e.g. #'abc-def') form.



File: gst-base.info,  Node: Symbol-testing functionality,  Prev: Symbol-testing,  Up: Symbol

1.150.10 Symbol: testing functionality
--------------------------------------

isString
     Answer `false'.

isSymbol
     Answer `true'.



File: gst-base.info,  Node: SymLink,  Next: SystemDictionary,  Prev: Symbol,  Up: Base classes

1.151 SymLink
=============

Defined in namespace Smalltalk
Superclass: Link
Category: Language-Implementation
     I am used to implement the Smalltalk symbol table.  My instances
     are links that contain symbols, and the symbol table basically a
     hash table that points to chains of my instances.

* Menu:

* SymLink class-instance creation::  (class)
* SymLink-accessing::  (instance)
* SymLink-iteration::  (instance)
* SymLink-printing::  (instance)


File: gst-base.info,  Node: SymLink class-instance creation,  Next: SymLink-accessing,  Up: SymLink

1.151.1 SymLink class: instance creation
----------------------------------------

symbol: aSymbol nextLink: aSymLink
     Answer a new SymLink, which refers to aSymbol and points to
     aSymLink as the next SymLink in the chain.



File: gst-base.info,  Node: SymLink-accessing,  Next: SymLink-iteration,  Prev: SymLink class-instance creation,  Up: SymLink

1.151.2 SymLink: accessing
--------------------------

symbol
     Answer the Symbol that the receiver refers to in the symbol table.

symbol: aSymbol
     Set the Symbol that the receiver refers to in the symbol table.



File: gst-base.info,  Node: SymLink-iteration,  Next: SymLink-printing,  Prev: SymLink-accessing,  Up: SymLink

1.151.3 SymLink: iteration
--------------------------

do: aBlock
     Evaluate aBlock for each symbol in the list



File: gst-base.info,  Node: SymLink-printing,  Prev: SymLink-iteration,  Up: SymLink

1.151.4 SymLink: printing
-------------------------

printOn: aStream
     Print a representation of the receiver on aStream.



File: gst-base.info,  Node: SystemDictionary,  Next: SystemExceptions.AlreadyDefined,  Prev: SymLink,  Up: Base classes

1.152 SystemDictionary
======================

Defined in namespace Smalltalk
Superclass: RootNamespace
Category: Language-Implementation
     I am a special namespace. I only have one instance, called
     "Smalltalk", which is known to the Smalltalk interpreter.  I define
     several methods that are "system" related, such as #quitPrimitive.
     My instance also helps keep track of dependencies between objects.

* Menu:

* SystemDictionary-basic::  (instance)
* SystemDictionary-builtins::  (instance)
* SystemDictionary-c call-outs::  (instance)
* SystemDictionary-miscellaneous::  (instance)
* SystemDictionary-printing::  (instance)
* SystemDictionary-special accessing::  (instance)
* SystemDictionary-testing::  (instance)


File: gst-base.info,  Node: SystemDictionary-basic,  Next: SystemDictionary-builtins,  Up: SystemDictionary

1.152.1 SystemDictionary: basic
-------------------------------

halt
     Interrupt interpreter

hash
     Smalltalk usually contains a reference to itself, avoid infinite
     loops



File: gst-base.info,  Node: SystemDictionary-builtins,  Next: SystemDictionary-c call-outs,  Prev: SystemDictionary-basic,  Up: SystemDictionary

1.152.2 SystemDictionary: builtins
----------------------------------

basicBacktrace
     Prints the method invocation stack backtrace, as an aid to
     debugging

byteCodeCounter
     Answer the number of bytecodes executed by the VM

debug
     This methods provides a way to break in the VM code.  Set a
     breakpoint in _gst_debug and call this method near the point where
     you think the bug happens.

declarationTrace
     Answer whether compiled bytecodes are printed on stdout

declarationTrace: aBoolean
     Set whether compiled bytecodes are printed on stdout

"==========================================================================
     These Not commented.

executionTrace: aBoolean
     Set whether executed bytecodes are printed on stdout

getTraceFlag: anIndex
     Private - Returns a boolean value which is one of the interpreter's
     tracing flags

setTraceFlag: anIndex to: aBoolean
     Private - Sets the value of one of the interpreter's tracing flags
     (indicated by 'anIndex') to the value aBoolean.

verboseTrace
     Answer whether execution tracing prints the object on the stack top

verboseTrace: aBoolean
     Set whether execution tracing prints the object on the stack top



File: gst-base.info,  Node: SystemDictionary-c call-outs,  Next: SystemDictionary-miscellaneous,  Prev: SystemDictionary-builtins,  Up: SystemDictionary

1.152.3 SystemDictionary: c call-outs
-------------------------------------

getArgc
     Not commented.

getArgv: index
     Not commented.

getenv: aString
     Not commented.

putenv: aString
     Not commented.

system: aString
     Not commented.



File: gst-base.info,  Node: SystemDictionary-miscellaneous,  Next: SystemDictionary-printing,  Prev: SystemDictionary-c call-outs,  Up: SystemDictionary

1.152.4 SystemDictionary: miscellaneous
---------------------------------------

arguments
     Return the command line arguments after the -a switch

backtrace
     Print a backtrace on the Transcript.

hostSystem
     Answer the triplet corresponding to the system for which GNU
     Smalltalk was built.



File: gst-base.info,  Node: SystemDictionary-printing,  Next: SystemDictionary-special accessing,  Prev: SystemDictionary-miscellaneous,  Up: SystemDictionary

1.152.5 SystemDictionary: printing
----------------------------------

nameIn: aNamespace
     Answer `'Smalltalk".

printOn: aStream in: aNamespace
     Store Smalltalk code compiling to the receiver

storeOn: aStream
     Store Smalltalk code compiling to the receiver



File: gst-base.info,  Node: SystemDictionary-special accessing,  Next: SystemDictionary-testing,  Prev: SystemDictionary-printing,  Up: SystemDictionary

1.152.6 SystemDictionary: special accessing
-------------------------------------------

addFeature: aFeature
     Add the aFeature feature to the Features set

hasFeatures: features
     Returns true if the feature or features in 'features' is one of the
     implementation dependent features present

removeFeature: aFeature
     Remove the aFeature feature to the Features set

version
     Answer the current version of the GNU Smalltalk environment



File: gst-base.info,  Node: SystemDictionary-testing,  Prev: SystemDictionary-special accessing,  Up: SystemDictionary

1.152.7 SystemDictionary: testing
---------------------------------

isSmalltalk
     Answer `true'.



File: gst-base.info,  Node: SystemExceptions.AlreadyDefined,  Next: SystemExceptions.ArgumentOutOfRange,  Prev: SystemDictionary,  Up: Base classes

1.153 SystemExceptions.AlreadyDefined
=====================================

Defined in namespace Smalltalk.SystemExceptions
Superclass: SystemExceptions.InvalidArgument
Category: Language-Exceptions
     I am raised when one tries to define a symbol (class or pool
     variable) that is already defined.

* Menu:

* SystemExceptions.AlreadyDefined-accessing::  (instance)


File: gst-base.info,  Node: SystemExceptions.AlreadyDefined-accessing,  Up: SystemExceptions.AlreadyDefined

1.153.1 SystemExceptions.AlreadyDefined: accessing
--------------------------------------------------

description
     Answer a description for the error



File: gst-base.info,  Node: SystemExceptions.ArgumentOutOfRange,  Next: SystemExceptions.BadReturn,  Prev: SystemExceptions.AlreadyDefined,  Up: Base classes

1.154 SystemExceptions.ArgumentOutOfRange
=========================================

Defined in namespace Smalltalk.SystemExceptions
Superclass: SystemExceptions.InvalidArgument
Category: Language-Exceptions
     I am raised when one invokes a method with an argument outside of
     its valid range.

* Menu:

* SystemExceptions.ArgumentOutOfRange class-signaling::  (class)
* SystemExceptions.ArgumentOutOfRange-accessing::  (instance)

