This is gst-base.info, produced by makeinfo version 4.13 from
/home/pbonzini/devel/gst/+build/doc/../../doc/gst-base-fixed.texi.

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

     Permission is granted to copy, distribute and/or modify this
     document under the terms of the GNU Free Documentation License,
     Version 1.2 or any later version published by the Free Software
     Foundation; with no Invariant Sections, with no Front-Cover Texts,
     and with no Back-Cover Texts.  A copy of the license is included
     in the section entitled "GNU Free Documentation License".


File: gst-base.info,  Node: File class-testing,  Next: File-accessing,  Prev: File class-reading system defaults,  Up: File

1.73.6 File class: testing
--------------------------

exists: fileName
     Answer whether a file with the given name exists

isAccessible: fileName
     Answer whether a directory with the given name exists and can be
     accessed

isExecutable: fileName
     Answer whether a file with the given name exists and can be
     executed

isReadable: fileName
     Answer whether a file with the given name exists and is readable

isWriteable: fileName
     Answer whether a file with the given name exists and is writeable



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

1.73.7 File: accessing
----------------------

asString
     Answer the name of the file identified by the receiver

at: aString
     Answer a File or Directory object as appropriate for a file named
     'aName' in the directory represented by the receiver.

creationTime
     Answer the creation time of the file identified by the receiver.
     On some operating systems, this could actually be the last change
     time (the `last change time' has to do with permissions, ownership
     and the like).

isDirectory
     Answer whether the file is a directory.

isSocket
     Answer whether the file is an AF_UNIX socket.

isSymbolicLink
     Answer whether the file is a symbolic link.

lastAccessTime
     Answer the last access time of the file identified by the receiver

lastChangeTime
     Answer the last change time of the file identified by the receiver
     (the `last change time' has to do with permissions, ownership and
     the like). On some operating systems, this could actually be the
     file creation time.

lastModifyTime
     Answer the last modify time of the file identified by the receiver
     (the `last modify time' has to do with the actual file contents).

mode
     Answer the permission bits for the file identified by the receiver

mode: anInteger
     Set the permission bits for the file identified by the receiver to
     be anInteger.

name
     Answer the name of the file identified by the receiver

pathTo: destName
     Compute the relative path from the receiver to destName.

refresh
     Refresh the statistics for the receiver

size
     Answer the size of the file identified by the receiver



File: gst-base.info,  Node: File-basic,  Next: File-directory operations,  Prev: File-accessing,  Up: File

1.73.8 File: basic
------------------

= aFile
     Answer whether the receiver represents the same file as the
     receiver.

hash
     Answer a hash value for the receiver.



File: gst-base.info,  Node: File-directory operations,  Next: File-file name management,  Prev: File-basic,  Up: File

1.73.9 File: directory operations
---------------------------------

createDirectory
     Create the receiver as a directory.

namesDo: aBlock
     Evaluate aBlock once for each file in the directory represented by
     the receiver, passing its name. aBlock should not return.



File: gst-base.info,  Node: File-file name management,  Next: File-file operations,  Prev: File-directory operations,  Up: File

1.73.10 File: file name management
----------------------------------

full
     Answer the full name of the receiver, resolving the `.' and `..'
     directory entries, and answer the result.  Answer nil if the name
     is invalid (such as '/usr/../../badname')



File: gst-base.info,  Node: File-file operations,  Next: File-still unclassified,  Prev: File-file name management,  Up: File

1.73.11 File: file operations
-----------------------------

lastAccessTime: accessDateTime lastModifyTime: modifyDateTime
     Set the receiver's timestamps to be accessDateTime and
     modifyDateTime.

open: class mode: mode ifFail: aBlock
     Open the receiver in the given mode (as answered by FileStream's
     class constant methods)

owner: ownerString group: groupString
     Set the receiver's owner and group to be ownerString and
     groupString.

pathFrom: dir
     Compute the relative path from the directory dirName to the
     receiver

remove
     Remove the file with the given path name

renameTo: newFileName
     Rename the file with the given path name to newFileName

symlinkAs: destName
     Create destName as a symbolic link of the receiver.  The
     appropriate relative path is computed automatically.

symlinkFrom: srcName
     Create the receiver as a symlink from path destName



File: gst-base.info,  Node: File-still unclassified,  Next: File-testing,  Prev: File-file operations,  Up: File

1.73.12 File: still unclassified
--------------------------------

, aName
     Answer an object of the same kind as the receiver, whose name is
     suffixed with aName.



File: gst-base.info,  Node: File-testing,  Prev: File-still unclassified,  Up: File

1.73.13 File: testing
---------------------

exists
     Answer whether a file with the name contained in the receiver does
     exist.

isAbsolute
     Answer whether the receiver identifies an absolute path.

isAccessible
     Answer whether a directory with the name contained in the receiver
     does exist and is accessible

isExecutable
     Answer whether a file with the name contained in the receiver does
     exist and is executable

isFileSystemPath
     Answer whether the receiver corresponds to a real filesystem path.

isReadable
     Answer whether a file with the name contained in the receiver does
     exist and is readable

isWriteable
     Answer whether a file with the name contained in the receiver does
     exist and is writeable



File: gst-base.info,  Node: FileDescriptor,  Next: FilePath,  Prev: File,  Up: Base classes

1.74 FileDescriptor
===================

Defined in namespace Smalltalk
Superclass: Stream
Category: Streams-Files
     My instances are what conventional programmers think of as files.
     My instance creation methods accept the name of a disk file (or
     any named file object, such as /dev/rmt0 on UNIX or MTA0: on VMS).
     In addition, they accept a virtual filesystem path like
     `configure.gz#ugz' which can be used to transparently extract or
     decompress files from archives, or do arbitrary processing on the
     files.

* Menu:

* FileDescriptor class-initialization::  (class)
* FileDescriptor class-instance creation::  (class)
* FileDescriptor class-still unclassified::  (class)
* FileDescriptor-accessing::  (instance)
* FileDescriptor-basic::  (instance)
* FileDescriptor-binary I/O::  (instance)
* FileDescriptor-built ins::  (instance)
* FileDescriptor-class type methods::  (instance)
* FileDescriptor-initialize-release::  (instance)
* FileDescriptor-low-level access::  (instance)
* FileDescriptor-overriding inherited methods::  (instance)
* FileDescriptor-polymorphism::  (instance)
* FileDescriptor-positioning::  (instance)
* FileDescriptor-printing::  (instance)
* FileDescriptor-testing::  (instance)


File: gst-base.info,  Node: FileDescriptor class-initialization,  Next: FileDescriptor class-instance creation,  Up: FileDescriptor

1.74.1 FileDescriptor class: initialization
-------------------------------------------

initialize
     Initialize the receiver's class variables

update: aspect
     Close open files before quitting



File: gst-base.info,  Node: FileDescriptor class-instance creation,  Next: FileDescriptor class-still unclassified,  Prev: FileDescriptor class-initialization,  Up: FileDescriptor

1.74.2 FileDescriptor class: instance creation
----------------------------------------------

append
     Open for writing.  The file is created if it does not exist.  The
     stream is positioned at the end of the file.

create
     Open for reading and writing.  The file is created if it does not
     exist, otherwise it is truncated.  The stream is positioned at the
     beginning of the file.

fopen: fileName mode: fileMode
     Open fileName in the required mode - answered by #append, #create,
     #readWrite, #read or #write - and fail if the file cannot be
     opened.  Else answer a new FileStream. For mode anyway you can use
     any standard C non-binary fopen mode.  The file will be
     automatically closed upon GC if the object is not referenced
     anymore, but it is better to close it as soon as you're finished
     with it anyway, using #close. To keep a file open even when no
     references exist anymore, send it #removeToBeFinalized

fopen: fileName mode: fileMode ifFail: aBlock
     Open fileName in the required mode - answered by #append, #create,
     #readWrite, #read or #write - and evaluate aBlock if the file
     cannot be opened. Else answer a new FileStream. For mode anyway
     you can use any The file will be automatically closed upon GC if
     the object is not referenced anymore, but it is better to close it
     as soon as you're finished with it anyway, using #close. To keep a
     file open even when no references exist anymore, send it
     #removeToBeFinalized

on: fd
     Open a FileDescriptor on the given file descriptor.  Read-write
     access is assumed.

open: fileName
     Open fileName in read-write mode - fail if the file cannot be
     opened.  Else answer a new FileStream.  The file will be
     automatically closed upon GC if the object is not referenced
     anymore, but you should close it with #close anyway.  To keep a
     file open, send it #removeToBeFinalized

open: fileName mode: fileMode ifFail: aBlock
     Open fileName in the required mode - answered by #append, #create,
     #readWrite, #read or #write - and evaluate aBlock if the file
     cannot be opened. Else answer a new instance of the receiver. For
     mode anyway you can use any standard C non-binary fopen mode.
     fileName can be a `virtual filesystem' path, including URLs and
     '#' suffixes that are inspected by the virtual filesystem layers
     and replaced with tasks such as un-gzipping a file or extracting a
     file from an archive.

     The file will be automatically closed upon GC if the object is not
     referenced anymore, but it is better to close it as soon as you're
     finished with it anyway, using #close. To keep a file open even
     when no references exist anymore, send it #removeToBeFinalized

openTemporaryFile: baseName
     Open for writing a file whose name starts with baseName, followed
     by six random alphanumeric characters.  The file is created with
     mode read/write and permissions 0666 or 0600 on most recent
     operating systems (beware, the former behavior might constitute a
     security problem).  The file is opened with the O_EXCL flag,
     guaranteeing that when the method returns successfully we are the
     only user.

popen: commandName dir: direction
     Open a pipe on the given command and fail if the file cannot be
     opened.  Else answer a new FileStream.  The pipe will not be
     automatically closed upon GC, even if the object is not referenced
     anymore, because when you close a pipe you have to wait for the
     associated process to terminate.  direction is returned by #read
     or #write ('r' or 'w') and is interpreted from the point of view
     of Smalltalk: reading means Smalltalk reads the standard output of
     the command, writing means Smalltalk writes the standard input of
     the command. The other channel (stdin when reading, stdout when
     writing) is the same as GST's, unless commandName alters it.

popen: commandName dir: direction ifFail: aBlock
     Open a pipe on the given command and evaluate aBlock file cannot
     be opened. Else answer a new FileStream.  The pipe will not be
     automatically closed upon GC, even if the object is not referenced
     anymore, because when you close a pipe you have to wait for the
     associated process to terminate.  direction is interpreted from
     the point of view of Smalltalk: reading means that Smalltalk reads
     the standard output of the command, writing means that Smalltalk
     writes the standard input of the command

read
     Open text file for reading.  The stream is positioned at the
     beginning of the file.

readWrite
     Open for reading and writing.  The stream is positioned at the
     beginning of the file.

write
     Truncate file to zero length or create text file for writing.  The
     stream is positioned at the beginning of the file.



File: gst-base.info,  Node: FileDescriptor class-still unclassified,  Next: FileDescriptor-accessing,  Prev: FileDescriptor class-instance creation,  Up: FileDescriptor

1.74.3 FileDescriptor class: still unclassified
-----------------------------------------------

open: fileName mode: fileMode
     Open fileName in the required mode - answered by #append, #create,
     #readWrite, #read or #write - and fail if the file cannot be
     opened.  Else answer a new FileStream. For mode anyway you can use
     any standard C non-binary fopen mode.  fileName can be a `virtual
     filesystem' path, including URLs and '#' suffixes that are
     inspected by the virtual filesystem layers and replaced with tasks
     such as un-gzipping a file or extracting a file from an archive.

     The file will be automatically closed upon GC if the object is not
     referenced anymore, but it is better to close it as soon as you're
     finished with it anyway, using #close. To keep a file open even
     when no references exist anymore, send it #removeToBeFinalized



File: gst-base.info,  Node: FileDescriptor-accessing,  Next: FileDescriptor-basic,  Prev: FileDescriptor class-still unclassified,  Up: FileDescriptor

1.74.4 FileDescriptor: accessing
--------------------------------

canRead
     Answer whether the file is open and we can read from it

canWrite
     Answer whether the file is open and we can write from it

ensureReadable
     If the file is open, wait until data can be read from it.  The wait
     allows other Processes to run.

ensureWriteable
     If the file is open, wait until we can write to it.  The wait
     allows other Processes to run.

exceptionalCondition
     Answer whether the file is open and an exceptional condition (such
     as presence of out of band data) has occurred on it

fd
     Return the OS file descriptor of the file

file
     Return the name of the file

isOpen
     Answer whether the file is still open

isPeerAlive
     Present for compatibility with sockets.  For files, it answers
     whether the file is still open

isPipe
     Answer whether the file is a pipe or an actual disk file

name
     Return the name of the file

waitForException
     If the file is open, wait until an exceptional condition (such as
     presence of out of band data) has occurred on it.  The wait allows
     other Processes to run.



File: gst-base.info,  Node: FileDescriptor-basic,  Next: FileDescriptor-binary I/O,  Prev: FileDescriptor-accessing,  Up: FileDescriptor

1.74.5 FileDescriptor: basic
----------------------------

checkError
     Perform error checking.  By default, we call File
     class>>#checkError.

close
     Close the file

contents
     Answer the whole contents of the file

copyFrom: from to: to
     Answer the contents of the file between the two given positions

finalize
     Close the file if it is still open by the time the object becomes
     garbage.

invalidate
     Invalidate a file descriptor

next
     Return the next character in the file, or nil at eof

nextByte
     Return the next byte in the file, or nil at eof

nextPut: aCharacter
     Store aCharacter on the file

nextPutByte: anInteger
     Store the byte, anInteger, on the file

nextPutByteArray: aByteArray
     Store aByteArray on the file

peek
     Returns the next element of the stream without moving the pointer.
     Returns nil when at end of stream.

peekFor: anObject
     Returns whether the next element of the stream is equal to
     anObject, without moving the pointer if it is not.

position
     Answer the zero-based position from the start of the file

position: n
     Set the file pointer to the zero-based position n

reset
     Reset the stream to its beginning

shutdown
     Close the transmission side of a full-duplex connection.  This is
     useful on read-write pipes.

size
     Return the current size of the file, in bytes

truncate
     Truncate the file at the current position



File: gst-base.info,  Node: FileDescriptor-binary I/O,  Next: FileDescriptor-built ins,  Prev: FileDescriptor-basic,  Up: FileDescriptor

1.74.6 FileDescriptor: binary I/O
---------------------------------

nextByteArray: numBytes
     Return the next numBytes bytes in the byte array

nextDouble
     Return the next 64-bit float in the byte array

nextFloat
     Return the next 32-bit float in the byte array

nextLong
     Return the next 4 bytes in the byte array, interpreted as a 32 bit
     signed int

nextLongLong
     Return the next 8 bytes in the byte array, interpreted as a 64 bit
     signed int

nextPutDouble: aDouble
     Store aDouble as a 64-bit float in the byte array

nextPutFloat: aFloat
     Return the next 32-bit float in the byte array

nextPutInt64: anInteger
     Store anInteger (range: -2^63..2^64-1) on the byte array as 8 bytes

nextPutLong: anInteger
     Store anInteger (range: -2^31..2^32-1) on the byte array as 4 bytes

nextPutShort: anInteger
     Store anInteger (range: -32768..65535) on the byte array as 2 bytes

nextShort
     Return the next 2 bytes in the byte array, interpreted as a 16 bit
     signed int

nextSignedByte
     Return the next byte in the byte array, interpreted as a 8 bit
     signed number

nextUint64
     Return the next 8 bytes in the byte array, interpreted as a 64 bit
     unsigned int

nextUlong
     Return the next 4 bytes in the byte array, interpreted as a 32 bit
     unsigned int

nextUshort
     Return the next 2 bytes in the byte array, interpreted as a 16 bit
     unsigned int



File: gst-base.info,  Node: FileDescriptor-built ins,  Next: FileDescriptor-class type methods,  Prev: FileDescriptor-binary I/O,  Up: FileDescriptor

1.74.7 FileDescriptor: built ins
--------------------------------

fileIn
     File in the contents of the receiver.  During a file in operation,
     global variables (starting with an uppercase letter) that are not
     declared don't yield an `unknown variable' error. Instead, they
     are defined as nil in the `Undeclared' dictionary (a global
     variable residing in Smalltalk).  As soon as you add the variable
     to a namespace (for example by creating a class) the Association
     will be removed from Undeclared and reused in the namespace, so
     that the old references will automagically point to the new value.

fileOp: ioFuncIndex
     Private - Used to limit the number of primitives used by
     FileStreams

fileOp: ioFuncIndex ifFail: aBlock
     Private - Used to limit the number of primitives used by
     FileStreams.

fileOp: ioFuncIndex with: arg1
     Private - Used to limit the number of primitives used by
     FileStreams

fileOp: ioFuncIndex with: arg1 ifFail: aBlock
     Private - Used to limit the number of primitives used by
     FileStreams.

fileOp: ioFuncIndex with: arg1 with: arg2
     Private - Used to limit the number of primitives used by
     FileStreams

fileOp: ioFuncIndex with: arg1 with: arg2 ifFail: aBlock
     Private - Used to limit the number of primitives used by
     FileStreams.

fileOp: ioFuncIndex with: arg1 with: arg2 with: arg3
     Private - Used to limit the number of primitives used by
     FileStreams

fileOp: ioFuncIndex with: arg1 with: arg2 with: arg3 ifFail: aBlock
     Private - Used to limit the number of primitives used by
     FileStreams.

fileOp: ioFuncIndex with: arg1 with: arg2 with: arg3 with: arg4
     Private - Used to limit the number of primitives used by
     FileStreams

fileOp: ioFuncIndex with: arg1 with: arg2 with: arg3 with: arg4 ifFail: aBlock
     Private - Used to limit the number of primitives used by
     FileStreams.



File: gst-base.info,  Node: FileDescriptor-class type methods,  Next: FileDescriptor-initialize-release,  Prev: FileDescriptor-built ins,  Up: FileDescriptor

1.74.8 FileDescriptor: class type methods
-----------------------------------------

isBinary
     We answer characters, so answer false

isExternalStream
     We stream on an external entity (a file), so answer true

isText
     We answer characters, so answer true



File: gst-base.info,  Node: FileDescriptor-initialize-release,  Next: FileDescriptor-low-level access,  Prev: FileDescriptor-class type methods,  Up: FileDescriptor

1.74.9 FileDescriptor: initialize-release
-----------------------------------------

addToBeFinalized
     Add me to the list of open files.

initialize
     Initialize the receiver's instance variables

readStream
     Answer myself, or an alternate stream coerced for reading.

removeToBeFinalized
     Remove me from the list of open files.



File: gst-base.info,  Node: FileDescriptor-low-level access,  Next: FileDescriptor-overriding inherited methods,  Prev: FileDescriptor-initialize-release,  Up: FileDescriptor

1.74.10 FileDescriptor: low-level access
----------------------------------------

next: n putAll: aCollection startingAt: position
     Put the characters in the supplied range of aCollection in the file

nextAvailable: n into: aCollection startingAt: position
     Ignoring any buffering, try to fill the given range of aCollection
     with the contents of the file



File: gst-base.info,  Node: FileDescriptor-overriding inherited methods,  Next: FileDescriptor-polymorphism,  Prev: FileDescriptor-low-level access,  Up: FileDescriptor

1.74.11 FileDescriptor: overriding inherited methods
----------------------------------------------------

isEmpty
     Answer whether the receiver is empty

nextPutAllOn: aStream
     Put all the characters of the receiver in aStream.

reverseContents
     Return the contents of the file from the last byte to the first

setToEnd
     Reset the file pointer to the end of the file

skip: anInteger
     Skip anInteger bytes in the file



File: gst-base.info,  Node: FileDescriptor-polymorphism,  Next: FileDescriptor-positioning,  Prev: FileDescriptor-overriding inherited methods,  Up: FileDescriptor

1.74.12 FileDescriptor: polymorphism
------------------------------------

pastEnd
     The end of the stream has been reached.  Signal a Notification.



File: gst-base.info,  Node: FileDescriptor-positioning,  Next: FileDescriptor-printing,  Prev: FileDescriptor-polymorphism,  Up: FileDescriptor

1.74.13 FileDescriptor: positioning
-----------------------------------

isPositionable
     Answer true if the stream supports moving backwards with #skip:.



File: gst-base.info,  Node: FileDescriptor-printing,  Next: FileDescriptor-testing,  Prev: FileDescriptor-positioning,  Up: FileDescriptor

1.74.14 FileDescriptor: printing
--------------------------------

printOn: aStream
     Print a representation of the receiver on aStream



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

1.74.15 FileDescriptor: testing
-------------------------------

atEnd
     Answer whether data has come to an end



File: gst-base.info,  Node: FilePath,  Next: FileSegment,  Prev: FileDescriptor,  Up: Base classes

1.75 FilePath
=============

Defined in namespace Smalltalk
Superclass: Object
Category: Streams-Files
     I expose the syntax of file names, including paths.  I know how to
     manipulate such a path by splitting it into its components.  In
     addition, I expose information about files (both real and virtual)
     such as their size and timestamps.

* Menu:

* FilePath class-file name management::  (class)
* FilePath class-still unclassified::  (class)
* FilePath-accessing::  (instance)
* FilePath-converting::  (instance)
* FilePath-decoration::  (instance)
* FilePath-directory operations::  (instance)
* FilePath-enumerating::  (instance)
* FilePath-file name management::  (instance)
* FilePath-file operations::  (instance)
* FilePath-printing::  (instance)
* FilePath-still unclassified::  (instance)
* FilePath-testing::  (instance)
* FilePath-virtual filesystems::  (instance)


File: gst-base.info,  Node: FilePath class-file name management,  Next: FilePath class-still unclassified,  Up: FilePath

1.75.1 FilePath class: file name management
-------------------------------------------

append: fileName to: directory
     Answer the name of a file named `fileName' which resides in a
     directory named `directory'.

extensionFor: aString
     Answer the extension of a file named `aString'.  Note: the
     extension includes an initial dot.

fullNameFor: aString
     Answer the full path to a file called `aString', resolving the `.'
     and `..' directory entries, and answer the result.  `/..' is the
     same as '/'.

pathFor: aString
     Determine the path of the name of a file called `aString', and
     answer the result.  With the exception of the root directory, the
     final slash is stripped.

pathFor: aString ifNone: aBlock
     Determine the path of the name of a file called `aString', and
     answer the result.  With the exception of the root directory, the
     final slash is stripped.  If there is no path, evaluate aBlock and
     return the result.

pathFrom: srcName to: destName
     Answer the relative path to destName when the current directory is
     srcName's directory.

stripExtensionFrom: aString
     Remove the extension from the name of a file called `aString', and
     answer the result.

stripFileNameFor: aString
     Determine the path of the name of a file called `aString', and
     answer the result as a directory name including the final slash.

stripPathFrom: aString
     Remove the path from the name of a file called `aString', and
     answer the file name plus extension.



File: gst-base.info,  Node: FilePath class-still unclassified,  Next: FilePath-accessing,  Prev: FilePath class-file name management,  Up: FilePath

1.75.2 FilePath class: still unclassified
-----------------------------------------

isAbsolute: aString
     Answer whether aString is an absolute ptah.



File: gst-base.info,  Node: FilePath-accessing,  Next: FilePath-converting,  Prev: FilePath class-still unclassified,  Up: FilePath

1.75.3 FilePath: accessing
--------------------------

at: aName
     Answer a File or Directory object as appropriate for a file named
     'aName' in the directory represented by the receiver.

creationTime
     Answer the creation time of the file identified by the receiver.
     On some operating systems, this could actually be the last change
     time (the `last change time' has to do with permissions, ownership
     and the like).

group: aString
     Set the group of the file identified by the receiver to be aString.

includes: aName
     Answer whether a file named `aName' exists in the directory
     represented by the receiver.

lastAccessTime
     Answer the last access time of the file identified by the receiver

lastAccessTime: aDateTime
     Update the last access time of the file corresponding to the
     receiver, to be aDateTime.

lastAccessTime: accessDateTime lastModifyTime: modifyDateTime
     Update the timestamps of the file corresponding to the receiver,
     to be accessDateTime and modifyDateTime.

lastChangeTime
     Answer the last change time of the file identified by the receiver
     (the `last change time' has to do with permissions, ownership and
     the like). On some operating systems, this could actually be the
     file creation time.

lastModifyTime
     Answer the last modify time of the file identified by the receiver
     (the `last modify time' has to do with the actual file contents).

lastModifyTime: aDateTime
     Update the last modification timestamp of the file corresponding
     to the receiver, to be aDateTime.

mode
     Answer the permission bits for the file identified by the receiver

mode: anInteger
     Set the permission bits for the file identified by the receiver to
     be anInteger.

owner: aString
     Set the owner of the file identified by the receiver to be aString.

owner: ownerString group: groupString
     Set the owner and group of the file identified by the receiver to
     be aString.

pathTo: destName
     Compute the relative path from the receiver to destName.

refresh
     Refresh the statistics for the receiver

size
     Answer the size of the file identified by the receiver



File: gst-base.info,  Node: FilePath-converting,  Next: FilePath-decoration,  Prev: FilePath-accessing,  Up: FilePath

1.75.4 FilePath: converting
---------------------------

asFile
     Answer the receiver.



File: gst-base.info,  Node: FilePath-decoration,  Next: FilePath-directory operations,  Prev: FilePath-converting,  Up: FilePath

1.75.5 FilePath: decoration
---------------------------

all
     Return a decorator of the receiver that will provide recursive
     descent into directories for iteration methods.  Furthermore,
     iteration on the returned wrapper will not include '.' or '..'
     directory entries, and will include the receiver (directly, not
     via '.').



File: gst-base.info,  Node: FilePath-directory operations,  Next: FilePath-enumerating,  Prev: FilePath-decoration,  Up: FilePath

1.75.6 FilePath: directory operations
-------------------------------------

createDirectories
     Create the receiver as a directory, together with all its parents.

createDirectory
     Create the receiver as a directory, together with all its parents.

nameAt: aName
     Answer a FilePath for a file named `aName' residing in the
     directory represented by the receiver.



File: gst-base.info,  Node: FilePath-enumerating,  Next: FilePath-file name management,  Prev: FilePath-directory operations,  Up: FilePath

1.75.7 FilePath: enumerating
----------------------------

allFilesMatching: aPattern do: aBlock
     Evaluate aBlock on the File objects that match aPattern (according
     to String>>#match:) in the directory named by the receiver.
     Recursively descend into directories.

directories
     Answer an Array with Directory objects for the subdirectories of
     the directory represented by the receiver.

do: aBlock
     Evaluate aBlock once for each file in the directory represented by
     the receiver, passing a FilePath object (or a subclass) to it.  It
     depends on the subclass whether iteration will include the '.' and
     '..'  directory entries.

entries
     Answer an Array with File or Directory objects for the contents of
     the directory represented by the receiver.

entryNames
     Answer an Array with the names of the files in the directory
     represented by the receiver.

files
     Answer an Array with File objects for the contents of the directory
     represented by the receiver.

filesMatching: aPattern
     Evaluate aBlock once for each file in the directory represented by
     the receiver, passing a File or Directory object to aBlock.
     Returns the *names* of the files for which aBlock returns true.

filesMatching: aPattern do: block
     Evaluate block on the File objects that match aPattern (according
     to String>>#match:) in the directory named by the receiver.

namesDo: aBlock
     Evaluate aBlock once for each file in the directory represented by
     the receiver, passing its name.  It depends on the subclass whether
     iteration will include the '.' and '..'  directory entries.

namesMatching: aPattern do: block
     Evaluate block on the file names that match aPattern (according to
     String>>#match:) in the directory named by the receiver.

reject: aBlock
     Evaluate aBlock once for each file in the directory represented by
     the receiver, passing a File or Directory object to aBlock.
     Returns the *names* of the files for which aBlock returns true.

select: aBlock
     Evaluate aBlock once for each file in the directory represented by
     the receiver, passing a File or Directory object to aBlock.
     Returns the *names* of the files for which aBlock returns true.



File: gst-base.info,  Node: FilePath-file name management,  Next: FilePath-file operations,  Prev: FilePath-enumerating,  Up: FilePath

1.75.8 FilePath: file name management
-------------------------------------

directory
     Answer the Directory object for the receiver's path

extension
     Answer the extension of the receiver

full
     Answer the full name of the receiver, resolving the `.' and `..'
     directory entries, and answer the result.  Answer nil if the name
     is invalid (such as '/usr/../../badname')

fullName
     Answer a String with the full path to the receiver (same as #name;
     it is useless to override this method).

name
     Answer String with the full path to the receiver (same as
     #fullName).

parent
     Answer the Directory object for the receiver's path

path
     Answer the path (if any) of the receiver

stripExtension
     Answer the path (if any) and file name of the receiver

stripFileName
     Answer the path of the receiver, always including a directory name
     (possibly `.') and the final directory separator

stripPath
     Answer the file name and extension (if any) of the receiver



File: gst-base.info,  Node: FilePath-file operations,  Next: FilePath-printing,  Prev: FilePath-file name management,  Up: FilePath

1.75.9 FilePath: file operations
--------------------------------

contents
     Open a read-only FileStream on the receiver, read its contents,
     close the stream and answer the contents

fileIn
     File in the receiver

open: mode
     Open the receiver in the given mode (as answered by FileStream's
     class constant methods)

open: mode ifFail: aBlock
     Open the receiver in the given mode (as answered by FileStream's
     class constant methods). Upon failure, evaluate aBlock.

open: class mode: mode ifFail: aBlock
     Open the receiver in the given mode (as answered by FileStream's
     class constant methods)

openDescriptor: mode
     Open the receiver in the given mode (as answered by FileStream's
     class constant methods)

openDescriptor: mode ifFail: aBlock
     Open the receiver in the given mode (as answered by FileStream's
     class constant methods). Upon failure, evaluate aBlock.

pathFrom: dirName
     Compute the relative path from the directory dirName to the
     receiver

readStream
     Open a read-only FileStream on the receiver

remove
     Remove the file identified by the receiver

renameTo: newName
     Rename the file identified by the receiver to newName

symlinkAs: destName
     Create destName as a symbolic link of the receiver.  The
     appropriate relative path is computed automatically.

symlinkFrom: srcName
     Create the receiver as a symbolic link from srcName (relative to
     the path of the receiver).

touch
     Update the timestamp of the file corresponding to the receiver.

withReadStreamDo: aBlock
     Answer the result of invoking aBlock with a reading stream open on
     me, closing it when the dynamic extent of aBlock ends.

withWriteStreamDo: aBlock
     Answer the result of invoking aBlock with a writing stream open on
     me, closing it when the dynamic extent of aBlock ends.

writeStream
     Open a write-only FileStream on the receiver



File: gst-base.info,  Node: FilePath-printing,  Next: FilePath-still unclassified,  Prev: FilePath-file operations,  Up: FilePath

1.75.10 FilePath: printing
--------------------------

displayOn: aStream
     Print a representation of the receiver on aStream.

printOn: aStream
     Print a representation of the receiver on aStream.



File: gst-base.info,  Node: FilePath-still unclassified,  Next: FilePath-testing,  Prev: FilePath-printing,  Up: FilePath

1.75.11 FilePath: still unclassified
------------------------------------

/ aName
     Answer a File or Directory object as appropriate for a file named
     'aName' in the directory represented by the receiver.



File: gst-base.info,  Node: FilePath-testing,  Next: FilePath-virtual filesystems,  Prev: FilePath-still unclassified,  Up: FilePath

1.75.12 FilePath: testing
-------------------------

exists
     Answer whether a file with the name contained in the receiver does
     exist.

isAbsolute
     Answer whether the receiver identifies an absolute path.

isAccessible
     Answer whether a directory with the name contained in the receiver
     does exist and can be accessed

isDirectory
     Answer whether a file with the name contained in the receiver does
     exist and identifies a directory.

isExecutable
     Answer whether a file with the name contained in the receiver does
     exist and is executable

isFile
     Answer whether a file with the name contained in the receiver does
     exist and does not identify a directory.

isFileSystemPath
     Answer whether the receiver corresponds to a real filesystem path.

isReadable
     Answer whether a file with the name contained in the receiver does
     exist and is readable

isRelative
     Answer whether the receiver identifies a relative path.

isSymbolicLink
     Answer whether a file with the name contained in the receiver does
     exist and identifies a symbolic link.

isWriteable
     Answer whether a file with the name contained in the receiver does
     exist and is writeable



File: gst-base.info,  Node: FilePath-virtual filesystems,  Prev: FilePath-testing,  Up: FilePath

1.75.13 FilePath: virtual filesystems
-------------------------------------

zip
     Not commented.



File: gst-base.info,  Node: FileSegment,  Next: FileStream,  Prev: FilePath,  Up: Base classes

1.76 FileSegment
================

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Implementation
     My instances represent sections of files.  I am primarily used by
     the compiler to record source code locations.  I am not a part of
     the normal Smalltalk-80 kernel; I am specific to the GNU Smalltalk
     implementation.

* Menu:

* FileSegment class-basic::  (class)
* FileSegment class-installing::  (class)
* FileSegment-basic::  (instance)
* FileSegment-equality::  (instance)
* FileSegment-printing::  (instance)


File: gst-base.info,  Node: FileSegment class-basic,  Next: FileSegment class-installing,  Up: FileSegment

1.76.1 FileSegment class: basic
-------------------------------

on: aFile startingAt: startPos for: sizeInteger
     Create a new FileSegment referring to the contents of the given
     file, from the startPos-th byte and for sizeInteger bytes.  Note
     that FileSegments should always be created with full paths because
     relative paths are interpreted to be relative to the kernel
     directory.



File: gst-base.info,  Node: FileSegment class-installing,  Next: FileSegment-basic,  Prev: FileSegment class-basic,  Up: FileSegment

1.76.2 FileSegment class: installing
------------------------------------

relocate
     Remove the kernel path from all paths that start with it.  Needed
     to support $(DESTDIR) and relocatable installation.



File: gst-base.info,  Node: FileSegment-basic,  Next: FileSegment-equality,  Prev: FileSegment class-installing,  Up: FileSegment

1.76.3 FileSegment: basic
-------------------------

asString
     Answer a String containing the required segment of the file

copyFrom: from to: to
     Answer a String containing the given subsegment of the file.  As
     for streams, from and to are 0-based.

file
     Answer the File object for the file containing the segment

fileName
     Answer the name of the file containing the segment

filePos
     Answer the position in the file where the segment starts

relocateFrom: startPath map: map
     If the path starts with startPath, remove that part of the path.
     map is a Dictionary that is used so that equal filenames stay
     equal, without increasing the amount of memory that the image uses.

size
     Answer the length of the segment

withFileDo: aBlock
     Evaluate aBlock passing it the FileStream in which the segment
     identified by the receiver is stored



File: gst-base.info,  Node: FileSegment-equality,  Next: FileSegment-printing,  Prev: FileSegment-basic,  Up: FileSegment

1.76.4 FileSegment: equality
----------------------------

= aFileSegment
     Answer whether the receiver and aFileSegment are equal.

hash
     Answer an hash value for the receiver.



File: gst-base.info,  Node: FileSegment-printing,  Prev: FileSegment-equality,  Up: FileSegment

1.76.5 FileSegment: printing
----------------------------

printedFileName
     Answer a printed representation of the file containing the segment.
     While introducing some ambiguity, this representation is compact
     eliminates the path for kernel files, and produces a relative path
     from the current working directory for other files.



File: gst-base.info,  Node: FileStream,  Next: Float,  Prev: FileSegment,  Up: Base classes

1.77 FileStream
===============

Defined in namespace Smalltalk
Superclass: FileDescriptor
Category: Streams-Files
     My instances are what conventional programmers think of as files.
     My instance creation methods accept the name of a disk file (or
     any named file object, such as /dev/rmt0 on UNIX or MTA0: on VMS).

* Menu:

* FileStream class-file-in::  (class)
* FileStream class-standard streams::  (class)
* FileStream-basic::  (instance)
* FileStream-buffering::  (instance)
* FileStream-compiling::  (instance)
* FileStream-initialize-release::  (instance)
* FileStream-overriding inherited methods::  (instance)
* FileStream-testing::  (instance)


File: gst-base.info,  Node: FileStream class-file-in,  Next: FileStream class-standard streams,  Up: FileStream

1.77.1 FileStream class: file-in
--------------------------------

fileIn: aFileName
     File in the aFileName file. During a file in operation, global
     variables (starting with an uppercase letter) that are not
     declared yet don't yield an `unknown variable' error. Instead,
     they are defined as nil in the `Undeclared' dictionary (a global
     variable residing in Smalltalk).  As soon as you add the variable
     to a namespace (for example by creating a class) the Association
     will be removed from Undeclared and reused in the namespace, so
     that the old references will automagically point to the new value.

fileIn: aFileName ifMissing: aSymbol
     Conditionally do a file in, only if the key (often a class)
     specified by 'aSymbol' is not present in the Smalltalk system
     dictionary already.  During a file in operation, global variables
     (starting with an uppercase letter) that are not declared don't
     yield an `unknown variable' error. Instead, they are defined as
     nil in the `Undeclared' dictionary (a global variable residing in
     Smalltalk).  As soon as you add the variable to a namespace (for
     example by creating a class) the Association will be removed from
     Undeclared and reused in the namespace, so that the old references
     will automagically point to the new value.

fileIn: aFileName ifTrue: aBoolean
     Conditionally do a file in, only if the supplied boolean is true.
     During a file in operation, global variables (starting with an
     uppercase letter) that are not declared don't yield an `unknown
     variable' error. Instead, they are defined as nil in the
     `Undeclared' dictionary (a global variable residing in Smalltalk).
     As soon as you add the variable to a namespace (for example by
     creating a class) the Association will be removed from Undeclared
     and reused in the namespace, so that the old references will
     automagically point to the new value.

fileIn: aFileName line: lineInteger from: realFileName at: aCharPos
     File in the aFileName file giving errors such as if it was loaded
     from the given line, file name and starting position (instead of
     1).

generateMakefileOnto: aStream
     Generate a make file for the file-ins since record was last set to
     true.  Store it on aStream

initialize
     Private - Initialize the receiver's class variables

record: recordFlag
     Set whether Smalltalk should record information about nested
     file-ins.  When recording is enabled, use #generateMakefileOnto:
     to automatically generate a valid makefile for the intervening
     file-ins.

require: assoc
     Conditionally do a file in from the value of assoc, only if the
     key of assoc is not present in the Smalltalk system dictionary
     already.  During a file in operation, global variables (starting
     with an uppercase letter) that are not declared don't yield an
     `unknown variable' error. Instead, they are defined as nil in the
     `Undeclared' dictionary (a global variable residing in Smalltalk).
     As soon as you add the variable to a namespace (for example by
     creating a class) the Association will be removed from Undeclared
     and reused in the namespace, so that the old references will
     automagically point to the new value.

verbose: verboseFlag
     Set whether Smalltalk should output debugging messages when filing
     in



File: gst-base.info,  Node: FileStream class-standard streams,  Next: FileStream-basic,  Prev: FileStream class-file-in,  Up: FileStream

1.77.2 FileStream class: standard streams
-----------------------------------------

stderr
     Answer a FileStream that is attached the Smalltalk program's
     standard error file handle, which can be used for error messages
     and diagnostics issued by the program.

stdin
     Answer a FileStream that is attached the Smalltalk program's
     standard input file handle, which is the normal source of input
     for the program.

stdout
     Answer a FileStream that is attached the Smalltalk program's
     standard output file handle; this is used for normal output from
     the program.



File: gst-base.info,  Node: FileStream-basic,  Next: FileStream-buffering,  Prev: FileStream class-standard streams,  Up: FileStream

1.77.3 FileStream: basic
------------------------

bufferStart
     Private - Answer the offset from the start of the file
     corresponding to the beginning of the read buffer.

copyFrom: from to: to
     Answer the contents of the file between the two given positions

next
     Return the next character in the file, or nil at eof

nextPut: aCharacter
     Store aCharacter on the file

peek
     Return the next character in the file, or nil at eof.  Don't
     advance the file pointer.

position
     Answer the zero-based position from the start of the file

position: n
     Set the file pointer to the zero-based position n

size
     Return the current size of the file, in bytes

truncate
     Truncate the file at the current position



File: gst-base.info,  Node: FileStream-buffering,  Next: FileStream-compiling,  Prev: FileStream-basic,  Up: FileStream

1.77.4 FileStream: buffering
----------------------------

bufferSize
     Answer the file's current buffer

bufferSize: bufSize
     Flush the file and set the buffer's size to bufSize

clean
     Synchronize the file descriptor's state with the object's state.

fill
     Private - Fill the input buffer

flush
     Flush the output buffer.

newBuffer
     Private - Answer a String to be used as the receiver's buffer

next: n bufferAll: aCollection startingAt: pos
     Private - Assuming that the buffer has space for n characters,
     store n characters of aCollection in the buffer, starting from the
     pos-th.

nextAvailable: anInteger into: aCollection startingAt: pos
     Read up to anInteger bytes from the stream and store them into
     aCollection.  Return the number of bytes read.

nextAvailable: anInteger putAllOn: aStream
     Copy up to anInteger bytes from the stream into aStream.  Return
     the number of bytes read.

pendingWrite
     Answer whether the output buffer is full.



File: gst-base.info,  Node: FileStream-compiling,  Next: FileStream-initialize-release,  Prev: FileStream-buffering,  Up: FileStream

1.77.5 FileStream: compiling
----------------------------

segmentFrom: startPos to: endPos
     Answer an object that, when sent #asString, will yield the result
     of sending `copyFrom: startPos to: endPos' to the receiver



File: gst-base.info,  Node: FileStream-initialize-release,  Next: FileStream-overriding inherited methods,  Prev: FileStream-compiling,  Up: FileStream

1.77.6 FileStream: initialize-release
-------------------------------------

initialize
     Initialize the receiver's instance variables



File: gst-base.info,  Node: FileStream-overriding inherited methods,  Next: FileStream-testing,  Prev: FileStream-initialize-release,  Up: FileStream

1.77.7 FileStream: overriding inherited methods
-----------------------------------------------

next: n putAll: aCollection startingAt: pos
     Write n values from aCollection, the first being at pos.

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.

nextPutAllOn: aStream
     Put all the characters of the receiver in aStream.

upTo: aCharacter
     Returns a collection of the same type that the stream accesses,
     containing data up to aCharacter.  Returns the entire rest of the
     stream's contents if no such character is found.



File: gst-base.info,  Node: FileStream-testing,  Prev: FileStream-overriding inherited methods,  Up: FileStream

1.77.8 FileStream: testing
--------------------------

atEnd
     Answer whether data has come to an end



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

1.78 Float
==========

Defined in namespace Smalltalk
Superclass: Number
Category: Language-Data types
     My instances represent floating point numbers that have arbitrary
     precision.  Besides the standard numerical operations, they provide
     transcendental operations too.  They implement IEEE-754 correctly
     if the hardware supports it.

* Menu:

* Float class-byte-order dependancies::  (class)
* Float class-characterization::  (class)
* Float-arithmetic::  (instance)
* Float-basic::  (instance)
* Float-built ins::  (instance)
* Float-coercing::  (instance)
* Float-coercion::  (instance)
* Float-comparing::  (instance)
* Float-converting::  (instance)
* Float-floating point::  (instance)
* Float-misc math::  (instance)
* Float-printing::  (instance)
* Float-storing::  (instance)
* Float-testing::  (instance)
* Float-testing functionality::  (instance)
* Float-transcendental operations::  (instance)
* Float-truncation and round off::  (instance)


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

1.78.1 Float class: byte-order dependancies
-------------------------------------------

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



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

1.78.2 Float class: characterization
------------------------------------

denormalized
     Answer whether instances of the receiver can be in denormalized
     form.

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

epsilon
     Return the smallest Float x for which is 1 + x ~= 1

fmin
     Return the smallest Float that is > 0.

fminDenormalized
     Return the smallest Float that is > 0 if denormalized values are
     supported, else return 0.

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

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

radix
     Answer the base in which computations between instances of the
     receiver are made.  This should be 2 on about every known
     computer, so GNU Smalltalk always answers 2.



File: gst-base.info,  Node: Float-arithmetic,  Next: Float-basic,  Prev: Float class-characterization,  Up: Float

1.78.3 Float: arithmetic
------------------------

integerPart
     Return the receiver's integer part

negated
     Return the negation of the receiver.  Unlike 0-self, this converts
     correctly signed zeros.

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



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

1.78.4 Float: basic
-------------------

hash
     Answer an hash value for the receiver.  Not-a-number values do not
     have a hash code and cannot be put in a hashed collection.



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

1.78.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-coercion,  Prev: Float-built ins,  Up: Float

1.78.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-coercion,  Next: Float-comparing,  Prev: Float-coercing,  Up: Float

1.78.7 Float: coercion
----------------------

asCNumber
     Convert the receiver to a kind of number that is understood by the
     C call-out mechanism.



File: gst-base.info,  Node: Float-comparing,  Next: Float-converting,  Prev: Float-coercion,  Up: Float

1.78.8 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-converting,  Next: Float-floating point,  Prev: Float-comparing,  Up: Float

1.78.9 Float: converting
------------------------

half
     Answer 0.5 in the representation of the receiver



File: gst-base.info,  Node: Float-floating point,  Next: Float-misc math,  Prev: Float-converting,  Up: Float

1.78.10 Float: floating point
-----------------------------

predecessor
     Not commented.

successor
     Not commented.



File: gst-base.info,  Node: Float-misc math,  Next: Float-printing,  Prev: Float-floating point,  Up: Float

1.78.11 Float: misc math
------------------------

log: aNumber
     Answer log base aNumber of the receiver



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

1.78.12 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.78.13 Float: storing
----------------------

isLiteralObject
     Answer whether the receiver is expressible as a Smalltalk literal.

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

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.78.14 Float: testing
----------------------

isExact
     Answer whether the receiver performs exact arithmetic.  Floats do
     not.

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.78.15 Float: testing functionality
------------------------------------

isFloat
     Answer `true'.



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

1.78.16 Float: transcendental operations
----------------------------------------

asFloat
     Just defined for completeness.  Return the receiver.

ceilingLog: radix
     Answer (self log: radix) ceiling.  Use exact arithmetic if radix
     is not a floating point value.

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

floorLog: radix
     Answer (self log: radix) floor.  Use exact arithmetic if radix is
     not a floating point value.

log
     Answer log base 10 of the receiver.



File: gst-base.info,  Node: Float-truncation and round off,  Prev: Float-transcendental operations,  Up: Float

1.78.17 Float: truncation and round off
---------------------------------------

rounded
     Answer the receiver, rounded to the nearest integer



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

1.79 FloatD
===========

Defined in namespace Smalltalk
Superclass: Float
Category: Language-Data types
     My instances represent floating point numbers that have the same
     accuracy as C's "double" numbers.

* Menu:

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


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

1.79.1 FloatD class: byte-order dependencies
--------------------------------------------

fromBytes: aByteArray
     Answer a float with the bytes in aByteArray, which are in
     big-endian format.

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 dependencies,  Up: FloatD

1.79.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.79.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.79.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,  Next: FloatD-converting,  Prev: FloatD-built ins,  Up: FloatD

1.79.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: FloatD-converting,  Prev: FloatD-coercing,  Up: FloatD

1.79.6 FloatD: converting
-------------------------

half
     Coerce 0.5 to the receiver's class



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

1.80 FloatE
===========

Defined in namespace Smalltalk
Superclass: Float
Category: Language-Data types
     My instances represent floating point numbers that have the same
     accuracy as C's "float" numbers.

* Menu:

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


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

1.80.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-byte-order dependencies,  Next: FloatE class-characterization,  Prev: FloatE class-byte-order dependancies,  Up: FloatE

1.80.2 FloatE class: byte-order dependencies
--------------------------------------------

fromBytes: aByteArray
     Answer a float with the bytes in aByteArray, which are in
     big-endian format.



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

1.80.3 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.80.4 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.80.5 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,  Next: FloatE-converting,  Prev: FloatE-built ins,  Up: FloatE

1.80.6 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: FloatE-converting,  Prev: FloatE-coercing,  Up: FloatE

1.80.7 FloatE: converting
-------------------------

half
     Coerce 0.5 to the receiver's class



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

1.81 FloatQ
===========

Defined in namespace Smalltalk
Superclass: Float
Category: Language-Data types
     My instances represent floating point numbers that have the same
     accuracy as C's "long double" numbers.

* Menu:

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


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

1.81.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.81.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.81.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.81.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,  Next: FloatQ-converting,  Prev: FloatQ-built ins,  Up: FloatQ

1.81.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: FloatQ-converting,  Prev: FloatQ-coercing,  Up: FloatQ

1.81.6 FloatQ: converting
-------------------------

half
     Coerce 0.5 to the receiver's class



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

1.82 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-coercion::  (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.82.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.82.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.82.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.82.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-coercion,  Prev: Fraction-arithmetic,  Up: Fraction

1.82.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-coercion,  Next: Fraction-comparing,  Prev: Fraction-coercing,  Up: Fraction

1.82.6 Fraction: coercion
-------------------------

asCNumber
     Convert the receiver to a kind of number that is understood by the
     C call-out mechanism.



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

1.82.7 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.82.8 Fraction: converting
---------------------------

asExactFraction
     Answer the receiver, it is already a Fraction

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.82.9 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

sqrt
     Return the square root 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.82.10 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.82.11 Fraction: testing
-------------------------

isRational
     Answer whether the receiver is rational - true



File: gst-base.info,  Node: Generator,  Next: Getopt,  Prev: Fraction,  Up: Base classes

1.83 Generator
==============

Defined in namespace Smalltalk
Superclass: Stream
Category: Streams-Generators
     A Generator object provides a way to use blocks to define a Stream
     of many return values.  The return values are computed one at a
     time, as needed, and hence need not even be finite.

     A generator block is converted to a Generator with "Generator on:
     [...]".  The Generator itself is passed to the block, and as soon
     as a message like #next, #peek, #atEnd or #peekFor: is sent to the
     generator, execution of the block starts/resumes and goes on until
     the generator's #yield: method is called: then the argument of
     #yield: will be the Generator's next element.  If the block goes
     on to the end without calling #yield:, the Generator will produce
     no more elements and #atEnd will return true.

     You could achieve the effect of generators manually by writing your
     own class and storing all the local variables of the generator as
     instance variables.  For example, returning a list of integers
     could be done by setting a variable to 0, and having the #next
     method increment it and return it.  However, for a moderately
     complicated generator, writing a corresponding class would be much
     messier (and might lead to code duplication or inefficiency if you
     want to support #peek, #peekFor: and/or #atEnd): in general,
     providing a #do:-like interface is easy, but not providing a
     Stream-like one (think binary trees).

     The idea of generators comes from other programming languages, in
     particular this interface looks much like Scheme streams and Python
     generators.  But Python in turn mutuated the idea for example from
     Icon, where the idea of generators is central.  In Icon, every
     expression and function call behaves like a generator, and if a
     statement manages scalars, it automatically uses up all the results
     that the corresponding generator provides; on the other hand, Icon
     does not represent generators as first-class objects like Python
     and Smalltalk do.

* Menu:

* Generator class-instance creation::  (class)
* Generator-stream protocol::  (instance)


File: gst-base.info,  Node: Generator class-instance creation,  Next: Generator-stream protocol,  Up: Generator

1.83.1 Generator class: instance creation
-----------------------------------------

inject: aValue into: aBlock
     Return an infinite generator; the first item is aValue, the
     following items are obtained by passing the previous value to
     aBlock.

on: aBlock
     Return a generator and pass it to aBlock.  When #next is sent to
     the generator, the block will start execution, and will be
     suspended again as soon as #yield: is sent from the block to the
     generator.

on: aCollection do: aBlock
     Return a generator; for each item of aCollection, evaluate aBlock
     passing the generator and the item.



File: gst-base.info,  Node: Generator-stream protocol,  Prev: Generator class-instance creation,  Up: Generator

1.83.2 Generator: stream protocol
---------------------------------

atEnd
     Answer whether more data can be generated.

next
     Evaluate the generator until it generates the next value or
     decides that nothing else can be generated.

peek
     Evaluate the generator until it generates the next value or
     decides that nothing else can be generated, and save the value so
     that #peek or #next will return it again.

peekFor: anObject
     Evaluate the generator until it generates the next value or
     decides that nothing else can be generated, and if it is not equal
     to anObject, save the value so that #peek or #next will return it
     again.

yield: anObject
     When entering from the generator the code in the block is executed
     and control flow goes back to the consumer.  When entering from
     the consumer, the code after the continuation is executed, which
     resumes execution of the generator block.



File: gst-base.info,  Node: Getopt,  Next: Halt,  Prev: Generator,  Up: Base classes

1.84 Getopt
===========

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Data types
     This class is usually not instantiated.  Class methods provide a
     way to parse command lines from Smalltalk.

* Menu:

* Getopt class-instance creation::  (class)


File: gst-base.info,  Node: Getopt class-instance creation,  Up: Getopt

1.84.1 Getopt class: instance creation
--------------------------------------

parse: args with: pattern do: actionBlock
     Parse the command-line arguments in args according to the syntax
     specified in pattern.  For every command-line option found, the
     two-argument block actionBlock is evaluated passing the option
     name and the argument.  For file names (or in general, other
     command-line arguments than options) the block's first argument
     will be nil.  For options without arguments, or with unspecified
     optional arguments, the block's second argument will be nil.  The
     option name will be passed as a character object for short options,
     and as a string for long options.

     If an error is found, nil is returned.  For more information on
     the syntax of pattern, see #parse:with:do:ifError:.

parse: args with: pattern do: actionBlock ifError: errorBlock
     Parse the command-line arguments in args according to the syntax
     specified in pattern.  For every command-line option found, the
     two-argument block actionBlock is evaluated passing the option
     name and the argument.  For file names (or in general, other
     command-line arguments than options) the block's first argument
     will be nil.  For options without arguments, or with unspecified
     optional arguments, the block's second argument will be nil.  The
     option name will be passed as a character object for short options,
     and as a string for long options.

     If an error is found, the parsing is interrupted, errorBlock is
     evaluated, and the returned value is answered.

     Every whitespace-separated part (`word') of pattern specifies a
     command-line option.  If a word ends with a colon, the option will
     have a mandatory argument.  If a word ends with two colons, the
     option will have an optional argument.  Before the colons,
     multiple option names (either short names like `-l' or long names
     like `-long') can be specified.  Before passing the option to
     actionBlock, the name will be canonicalized to the last one.

     Prefixes of long options are accepted as long as they're unique,
     and they are canonicalized to the full name before passing it to
     actionBlock.  Additionally, the full name of an option is accepted
     even if it is the prefix of a longer option.

     Mandatory arguments can appear in the next argument, or in the
     same argument (separated by an = for arguments to long options).
     Optional arguments must appear in the same argument.



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

1.85 Halt
=========

Defined in namespace Smalltalk
Superclass: Exception
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.85.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.86 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.86.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 capacity

withAll: aCollection
     Answer a collection whose elements are all those in aCollection



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

1.86.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.86.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.86.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.86.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.86.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.86.7 HashedCollection: removing
---------------------------------

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



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

1.86.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.86.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.86.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.87 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.87.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.87.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.87.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.87.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.88 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.89 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.89.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.90 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.90.1 Integer class: converting
--------------------------------

coerce: aNumber
     Answer aNumber converted to a kind of Integer



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

1.90.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.90.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.90.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

digitAt: index
     Answer the index-th base-256 digit of the receiver (byte),
     expressed in two's complement

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

lowBit
     Return the index of the lowest order 1 bit of the receiver.

noMask: anInteger
     Answer 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.90.5 Integer: converting
--------------------------

asCharacter
     Return self as a Character or UnicodeCharacter object.

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.90.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.90.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.90.8 Integer: math methods
----------------------------

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

ceilingLog: radix
     Answer (self log: radix) ceiling. Optimized to answer an integer.

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

even
     Return whether the receiver is even

factorial
     Return the receiver's factorial.

floorLog: radix
     Answer (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.90.9 Integer: printing
------------------------

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

displayString
     Return the base 10 representation of the receiver

isLiteralObject
     Answer whether the receiver is expressible as a Smalltalk literal.

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

printOn: aStream paddedWith: padding to: size
     Print on aStream the base 10 representation of the receiver,
     padded if necessary to size characters with copies of padding.

printOn: aStream paddedWith: padding to: size base: baseInteger
     Print on aStream the base b representation of the receiver, padded
     if necessary to size characters with copies of padding.

printPaddedWith: padding to: size base: baseInteger
     Return the base baseInteger representation of the receiver, padded
     if necessary to size characters with copies of padding.

printString
     Return the base 10 representation of the receiver

printString: baseInteger
     Return the base baseInteger representation of the receiver

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

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

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

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.90.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.90.11 Integer: testing functionality
--------------------------------------

isInteger
     Answer `true'.

isRational
     Answer whether the receiver is rational - true



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

1.91 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.91.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.91.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.

copyFrom: startIndex to: stopIndex
     Not commented.

do: aBlock
     Evaluate the receiver for each element in aBlock

isEmpty
     Answer whether the receiver is empty.

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.91.3 Interval: printing
-------------------------

first
     Not commented.

increment
     Answer `step'.

last
     Answer the last value.

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.91.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.91.5 Interval: testing
------------------------

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

hash
     Answer an hash value for the receiver

isExact
     Answer whether elements of the receiver are computed using exact
     arithmetic.  This is true as long as the start and step value are
     exact (i.e. not floating-point).



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

1.92 Iterable
=============

Defined in namespace Smalltalk
Superclass: Object
Category: Collections
     I am an abstract class.  My instances are collections of objects
     that can be iterated.  The details on how they can be mutated (if
     at all possible) are left to the subclasses.

* Menu:

* Iterable class-multibyte encodings::  (class)
* Iterable-enumeration::  (instance)
* Iterable-iteration::  (instance)
* Iterable-streaming::  (instance)


File: gst-base.info,  Node: Iterable class-multibyte encodings,  Next: Iterable-enumeration,  Up: Iterable

1.92.1 Iterable class: multibyte encodings
------------------------------------------

isUnicode
     Answer true; the receiver is able to store arbitrary Unicode
     characters.



File: gst-base.info,  Node: Iterable-enumeration,  Next: Iterable-iteration,  Prev: Iterable class-multibyte encodings,  Up: Iterable

1.92.2 Iterable: enumeration
----------------------------

, anIterable
     Answer an iterable that enumerates first the elements of the
     receiver and then the elements of anIterable.

allSatisfy: aBlock
     Search the receiver for an element for which aBlock returns false.
     Answer true if none does, false otherwise.

anySatisfy: aBlock
     Search the receiver for an element for which aBlock returns true.
     Answer true if some does, false otherwise.

collect: aBlock
     Answer a new instance of a Collection containing all the results
     of evaluating aBlock passing each of the receiver's elements

conform: aBlock
     Search the receiver for an element for which aBlock returns false.
     Answer true if none does, false otherwise.

contains: aBlock
     Search the receiver for an element for which aBlock returns true.
     Answer true if some does, false otherwise.

count: aBlock
     Count the elements of the receiver for which aBlock returns true,
     and return their number.

detect: aBlock
     Search the receiver for an element for which aBlock returns true.
     If some does, answer it. If none does, fail

detect: aBlock ifNone: exceptionBlock
     Search the receiver for an element for which aBlock returns true.
     If some does, answer it. If none does, answer the result of
     evaluating aBlock

do: aBlock
     Enumerate each object of the receiver, passing them to aBlock

do: aBlock separatedBy: separatorBlock
     Enumerate each object of the receiver, passing them to aBlock.
     Between every two invocations of aBlock, invoke separatorBlock

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.

inject: thisValue into: binaryBlock
     First, pass to binaryBlock thisValue and the first element of the
     receiver; for each subsequent element, pass the result of the
     previous evaluation and an element. Answer the result of the last
     invocation.

noneSatisfy: aBlock
     Search the receiver for an element for which aBlock returns true.
     Answer true if none does, false otherwise.

reject: aBlock
     Answer a new instance of a Collection containing all the elements
     in the receiver which, when passed to aBlock, don't answer true

select: aBlock
     Answer a new instance of a Collection containing all the elements
     in the receiver which, when passed to aBlock, answer true



File: gst-base.info,  Node: Iterable-iteration,  Next: Iterable-streaming,  Prev: Iterable-enumeration,  Up: Iterable

1.92.3 Iterable: iteration
--------------------------

ifNil: nilBlock ifNotNilDo: iterableBlock
     Evaluate nilBlock if the receiver is nil, else evaluate
     iterableBlock with each element of the receiver (which should be
     an Iterable).

ifNotNilDo: iterableBlock
     Evaluate iterableBlock with each element of the receiver (which
     should be an Iterable) if not nil.  Else answer nil

ifNotNilDo: iterableBlock ifNil: nilBlock
     Evaluate nilBlock if the receiver is nil, else evaluate
     iterableBlock, passing each element of the receiver (which should
     be an Iterable).



File: gst-base.info,  Node: Iterable-streaming,  Prev: Iterable-iteration,  Up: Iterable

1.92.4 Iterable: streaming
--------------------------

nextPutAllOn: aStream
     Write all the objects in the receiver to aStream

readStream
     Return a stream with the same contents as the receiver.



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

1.93 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.93.1 LargeArray: overridden
-----------------------------

newCollection: size
     Create an Array of the given size



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

1.94 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.94.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.94.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.94.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: LargeByteArray,  Next: LargeInteger,  Prev: LargeArrayedCollection,  Up: Base classes

1.95 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.95.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.96 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.96.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.96.2 LargeInteger: 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

divExact: aNumber
     Dividing receiver by arg assuming that the remainder is zero, and
     answer the result

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.96.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

lowBit
     Return the index of the lowest order 1 bit of the receiver.



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

1.96.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 index-th base-256 digit of the receiver (byte),
     expressed in two's complement

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.96.5 LargeInteger: coercion
-----------------------------

asCNumber
     Convert the receiver to a kind of number that is understood by the
     C call-out mechanism.

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.96.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.96.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.96.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 different numbers.



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

1.97 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.97.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.97.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.97.3 LargeNegativeInteger: reverting to LargePositiveInteger
--------------------------------------------------------------

+ aNumber
     Sum the receiver and aNumber, answer the result

- aNumber
     Subtract aNumber from the receiver, 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.98 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.98.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.98.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.98.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.98.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.98.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.99 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.99.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.100 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.100.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.100.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.100.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.100.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.101 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.101.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.101.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.101.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.102 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.102.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.102.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.102.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).

identityIncludes: anObject
     Answer whether we include the anObject object

includes: anObject
     Answer whether we include anObject



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

1.102.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.103 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.103.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.103.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.103.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.103.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.103.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.104 LookupTable
=================

Defined in namespace Smalltalk
Superclass: Dictionary
Category: Collections-Keyed
     I am a more efficient variant of Dictionary that cannot be used as
     a pool dictionary of variables, as I don't use Associations to
     store key-value pairs.  I also cannot have nil as a key; if you
     need to be able to store nil as a key, use Dictionary instead.  I
     use the object equality comparison message #= to determine
     equivalence of indices.

* Menu:

* LookupTable class-instance creation::  (class)
* LookupTable-accessing::  (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.104.1 LookupTable class: instance creation
--------------------------------------------

new
     Create a new LookupTable with a default size



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

1.104.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-enumerating,  Next: LookupTable-hashing,  Prev: LookupTable-accessing,  Up: LookupTable

1.104.3 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.104.4 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.104.5 LookupTable: rehashing
------------------------------

rehash
     Rehash the receiver



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

1.104.6 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.104.7 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.105 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.105.1 Magnitude: basic
------------------------

< aMagnitude
     Answer whether the receiver is less than aMagnitude

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

= aMagnitude
     Answer whether the receiver is equal to aMagnitude

> 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.105.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.106 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.106.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.106.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

atAll: keyCollection
     Answer a new MappedCollection that only includes the given keys.
     The new MappedCollection might use keyCollection or consecutive
     integers for the keys, depending on the map's type. Fail if any of
     them is not found in the map.

collect: aBlock
     Answer a Collection with the same keys as the map, where accessing
     a key yields the value obtained by passing through aBlock the value
     accessible from the key in the receiver.  The result need not be
     another MappedCollection

contents
     Answer a bag with the receiver's values

copyFrom: a to: b
     Answer a new collection containing all the items in the receiver
     from the a-th to the b-th.

do: aBlock
     Evaluate aBlock for each object

domain
     Answer the receiver's domain

keys
     Answer the keys that can be used to access this collection.

keysAndValuesDo: aBlock
     Evaluate aBlock passing two arguments, one being a key that can be
     used to access this collection, and the other one being the value.

keysDo: aBlock
     Evaluate aBlock on the keys that can be used to access this
     collection.

map
     Answer the receiver's 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.107 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.107.1 Memory class: accessing
-------------------------------

at: anAddress
     Access the Smalltalk object (OOP) at the given address.

at: anAddress put: aValue
     Store a pointer (OOP) to the Smalltalk object identified by `value'
     at the given address.

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.108 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.108.1 Message class: creating instances
-----------------------------------------

selector: aSymbol argument: anObject
     Create a new Message with the given selector and argument

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.108.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.108.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.108.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.109 MessageNotUnderstood
==========================

Defined in namespace Smalltalk
Superclass: Error
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.109.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.109.2 MessageNotUnderstood: description
-----------------------------------------

description
     Answer a textual description of the exception.

isResumable
     Answer true.  #doesNotUnderstand: exceptions are by default
     resumable.



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

1.110 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-compiling methods::  (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.110.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.110.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-compiling methods,  Prev: Metaclass-accessing,  Up: Metaclass

1.110.3 Metaclass: basic
------------------------

name: className environment: aNamespace subclassOf: theSuperclass
     Private - create a full featured class and install it, or change
     the superclass or shape of an existing one; instance variable
     names, class variable names and pool dictionaries are left
     untouched.

name: className environment: aNamespace subclassOf: newSuperclass 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: theSuperclass 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: theSuperclass 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-compiling methods,  Next: Metaclass-delegation,  Prev: Metaclass-basic,  Up: Metaclass

1.110.4 Metaclass: compiling methods
------------------------------------

poolResolution
     Use my instance's poolResolution.



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

1.110.5 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

allSharedPoolDictionariesDo: aBlock
     Answer the shared pools visible from methods in the metaclass, in
     the correct search order.

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
     Answer the (possibly inherited) registered handler for pragma
     aSymbol, or nil if not found.

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.110.6 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.110.7 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.110.8 Metaclass: testing functionality
----------------------------------------

asClass
     Answer `instanceClass'.

isMetaclass
     Answer `true'.



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

1.111 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.111.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

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:.

mark
     To create a valid execution environment for the interpreter even
     before it starts, GST creates a fake context which invokes a
     special "termination" method.  A similar context is created by
     #valueWithUnwind, by using this method.

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.111.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.111.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.112 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.112.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.112.2 MethodDictionary: rehashing
-----------------------------------

rehash
     Rehash the receiver



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

1.112.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.113 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.113.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.113.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.114 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.114.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.114.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.114.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.114.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.114.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.114.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.114.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.115 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.115.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.115.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.116 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-still unclassified::  (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.116.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.116.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 path: pathString
     Answer an URL object made from all the parts passed as arguments.

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.116.3 NetClients.URL: accessing
---------------------------------

asString
     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.

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.116.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.116.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.116.6 NetClients.URL: initialize-release
------------------------------------------

initialize
     Initialize the object to a consistent state.



File: gst-base.info,  Node: NetClients.URL-printing,  Next: NetClients.URL-still unclassified,  Prev: NetClients.URL-initialize-release,  Up: NetClients.URL

1.116.7 NetClients.URL: printing
--------------------------------

printOn: stream
     Print a representation of the URL on the given stream.



File: gst-base.info,  Node: NetClients.URL-still unclassified,  Next: NetClients.URL-testing,  Prev: NetClients.URL-printing,  Up: NetClients.URL

1.116.8 NetClients.URL: still unclassified
------------------------------------------

contents
     Not commented.

entity
     Not commented.

readStream
     Not commented.



File: gst-base.info,  Node: NetClients.URL-testing,  Next: NetClients.URL-utilities,  Prev: NetClients.URL-still unclassified,  Up: NetClients.URL

1.116.9 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.116.10 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.117 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.117.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.118 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.118.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.118.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.119 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.119.1 NullValueHolder class: creating instances
-------------------------------------------------

new
     Not used - use `ValueHolder null' instead

uniqueInstance
     Answer the sole instance of NullValueHolder



File: gst-base.info,  Node: NullValueHolder-accessing,  Prev: NullValueHolder class-creating instances,  Up: NullValueHolder

1.119.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.120 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-coercion::  (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.120.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.

readFrom: aStream radix: anInteger
     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.

     The exponent (for example 1.2e-1) is only parsed if anInteger is
     10.



File: gst-base.info,  Node: Number class-testing,  Next: Number-arithmetic,  Prev: Number class-converting,  Up: Number

1.120.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-coercion,  Prev: Number class-testing,  Up: Number

1.120.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-coercion,  Next: Number-comparing,  Prev: Number-arithmetic,  Up: Number

1.120.4 Number: coercion
------------------------

asCNumber
     Convert the receiver to a kind of number that is understood by the
     C call-out mechanism.



File: gst-base.info,  Node: Number-comparing,  Next: Number-converting,  Prev: Number-coercion,  Up: Number

1.120.5 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.120.6 Number: converting
--------------------------

asExactFraction
     Return the receiver, converted to a Fraction retaining the exact
     value of the receiver.

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

asFraction
     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 radix: base scale: n
     Answer the receiver, divided by base^denDigits and converted to a
     ScaledDecimal object.

asString
     Answer the receiver's #displayString, which should be a good enough
     conversion to String for a number.

coerce: aNumber
     Answer aNumber, converted to an integer or floating-point number.

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.120.7 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.120.8 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.120.9 Number: misc math
-------------------------

abs
     Answer the absolute value of the receiver

arcCos
     Answer the arc cosine of the receiver

arcCosh
     Answer the hyperbolic arc-cosine of the receiver.

arcSin
     Answer the arc sine of the receiver

arcSinh
     Answer the hyperbolic 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

arcTanh
     Answer the hyperbolic arc-tangent of the receiver.

ceilingLog: radix
     Answer (self log: radix) ceiling. Optimized to answer an integer.

cos
     Answer the cosine of the receiver

cosh
     Answer the hyperbolic 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 10 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

sinh
     Answer the hyperbolic 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

tanh
     Answer the hyperbolic 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.120.10 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.120.11 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.120.12 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 collect: aBlock
     Evaluate aBlock for each value in the interval going from the
     receiver to stop with the given step.  The results are collected
     in an Array and returned.

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 collect: aBlock
     Evaluate aBlock for each value in the interval going from the
     receiver to stop by 1.  The results are collected in an Array and
     returned.

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.120.13 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

isExact
     Answer whether the receiver performs exact arithmetic.  Most
     numeric classes do (in fact the only exceptions is Float and its
     descendants), so the default is to answer true rather than calling
     #subclassResponsibility.

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.120.14 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

roundTo: aNumber
     Answer the receiver, truncated to the nearest multiple of aNumber

rounded
     Returns the integer nearest the receiver

truncateTo: aNumber
     Answer the receiver, truncated towards zero to a multiple of
     aNumber

truncated
     Answer the receiver, truncated towards zero



File: gst-base.info,  Node: Object,  Next: ObjectDumper,  Prev: Number,  Up: Base classes

1.121 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-introspection::  (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.121.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 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.121.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: .

becomeForward: otherObject
     Change all references to the receiver into references to
     otherObject.  References to otherObject are not transformed into
     the receiver.  Answer the receiver so that it is not lost.

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 ifAbsent: aBlock
     Private - Check the reason why an access to the given indexed
     instance variable failed.  Evaluate aBlock for an invalid index.

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

halt
     Called to enter the debugger

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

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.121.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.121.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-returning
     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.121.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.121.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.121.7 Object: debugging
-------------------------

examine
     Print all the instance variables of the receiver on the Transcript

examineOn: aStream
     Print all the instance variables of the receiver on aStream

inspect
     In a GUI environment, this opens a tool to examine and modify the
     receiver.  In the default image, it just calls #examine.

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.121.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.121.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.

halt: message
     Display a walkback for the receiver, with the given error message.
     Signal an `Halt' exception.



File: gst-base.info,  Node: Object-finalization,  Next: Object-introspection,  Prev: Object-error raising,  Up: Object

1.121.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-introspection,  Next: Object-printing,  Prev: Object-finalization,  Up: Object

1.121.11 Object: introspection
------------------------------

instVarNamed: aString
     Answer the instance variable named aString in the receiver.

instVarNamed: aString put: anObject
     Answer the instance variable named aString in the receiver.



File: gst-base.info,  Node: Object-printing,  Next: Object-relational operators,  Prev: Object-introspection,  Up: Object

1.121.12 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

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.121.13 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.121.14 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.121.15 Object: storing
------------------------

store
     Put a String of Smalltalk code compiling to the receiver on the
     Transcript (stdout the GUI is not active)

storeLiteralOn: aStream
     Put a Smalltalk literal compiling to the receiver on aStream

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.121.16 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.121.17 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 notNilBlock 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'.

isCObject
     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.121.18 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.122 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.122.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.122.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.122.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.122.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.122.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.122.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.122.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.123 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.123.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.123.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).

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.123.3 ObjectMemory class: initialization
------------------------------------------

changed: aSymbol
     Not commented.

initialize
     Initialize the globals



File: gst-base.info,  Node: ObjectMemory class-saving the image,  Next: ObjectMemory-accessing,  Prev: ObjectMemory class-initialization,  Up: ObjectMemory

1.123.4 ObjectMemory class: saving the image
--------------------------------------------

snapshot
     Save a snapshot on the image file that was loaded on startup.

snapshot: aString
     Save an image on the aString file



File: gst-base.info,  Node: ObjectMemory-accessing,  Next: ObjectMemory-builtins,  Prev: ObjectMemory class-saving the image,  Up: ObjectMemory

1.123.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.

numOTEs
     Answer the number of entries that are currently allocated for the
     object table.

numOldOOPs
     Answer the number of objects that reside in the old generation.

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.123.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.123.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.124 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-enumerating::  (instance)
* OrderedCollection-removing::  (instance)


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

1.124.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.124.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

first
     Answer the first item of the receiver

last
     Answer the last item of the receiver

size
     Return the number of objects in the receiver



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

1.124.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-enumerating,  Next: OrderedCollection-removing,  Prev: OrderedCollection-adding,  Up: OrderedCollection

1.124.4 OrderedCollection: enumerating
--------------------------------------

do: aBlock
     Evaluate aBlock for all the elements in the collection



File: gst-base.info,  Node: OrderedCollection-removing,  Prev: OrderedCollection-enumerating,  Up: OrderedCollection

1.124.5 OrderedCollection: removing
-----------------------------------

identityRemove: oldObject
     Remove oldObject from the receiver. If absent, fail, else answer
     oldObject.

identityRemove: anObject ifAbsent: aBlock
     Remove anObject from the receiver. If it can't be found, answer the
     result of evaluating aBlock

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.125 Package
=============

Defined in namespace Smalltalk
Superclass: Kernel.PackageInfo
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 class-accessing::  (class)
* Package class-instance creation::  (class)
* Package-accessing::  (instance)
* Package-version parsing::  (instance)


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

1.125.1 Package class: accessing
--------------------------------

tags
     Not commented.



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

1.125.2 Package class: instance creation
----------------------------------------

parse: file
     Answer a package from the XML description in file.



File: gst-base.info,  Node: Package-accessing,  Next: Package-version parsing,  Prev: Package class-instance creation,  Up: Package

1.125.3 Package: accessing
--------------------------

addBuiltFile: aString
     Not commented.

addCallout: aString
     Not commented.

addFeature: aString
     Not commented.

addFile: aString
     Not commented.

addFileIn: aString
     Not commented.

addLibrary: aString
     Not commented.

addModule: aString
     Not commented.

addPrerequisite: aString
     Not commented.

addSunitScript: aString
     Not commented.

baseDirectories
     Answer `baseDirectories'.

baseDirectories: aCollection
     Check if it's possible to resolve the names in the package
     according to the base directories in baseDirectories, 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.

directory
     Answer the base directory from which to load the package.

features
     Answer a (modifiable) Set of features provided by the package.

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.

fullPathOf: fileName
     Try appending 'self directory' and fileName to each of the
     directory in baseDirectories, and return the path to the first
     tried filename that exists.  Raise a PackageNotAvailable exception
     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.

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.

primFileIn
     Private - File in the given package without paying attention at
     dependencies and C callout availability

relativeDirectory
     Answer the directory, relative to the packages file, from which to
     load the package.

relativeDirectory: dir
     Set the directory, relative to the packages file, from which to
     load the package, to dir.

startScript
     Answer the start script for the package.

startScript: aString
     Set the start script for the package to aString.

stopScript
     Answer the start script for the package.

stopScript: aString
     Set the stop script for the package to aString.

sunitScripts
     Answer a (modifiable) OrderedCollection of SUnit scripts that
     compose the package's test suite.

test
     Answer the test sub-package.

test: aPackage
     Set the test sub-package to be aPackage.

url
     Answer the URL at which the package repository can be found.

url: aString
     Set to aString the URL at which the package repository can be
     found.

version
     Not commented.

version: aVersion
     Not commented.



File: gst-base.info,  Node: Package-version parsing,  Prev: Package-accessing,  Up: Package

1.125.4 Package: version parsing
--------------------------------

parseVersion: aString
     Not commented.



File: gst-base.info,  Node: PackageLoader,  Next: Permission,  Prev: Package,  Up: Base classes

1.126 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.126.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 Directory object 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

packageAt: package ifAbsent: aBlock
     Answer a Package object for the given package

prerequisitesFor: package
     Answer a Set of Strings containing the prerequisites for the given
     package

refresh
     Reload the `packages.xml' file in the image and kernel directories.
     The three possible places are 1) the kernel directory's parent
     directory, 2) the `.st' subdirectory of the user's home directory,
     3) the local image directory (in order of decreasing priority).

     For a packages.xml found in the kernel directory's parent
     directory, all three directories are searched.  For a packages.xml
     found in the `.st' subdirectory, only directories 2 and 3 are
     searched.  For a packages.xml directory in the local image
     directory, finally, only directory 3 is searched.

sunitScriptFor: package
     Answer a Strings containing a SUnit script that describes the
     package's test suite.



File: gst-base.info,  Node: PackageLoader class-loading,  Next: PackageLoader class-testing,  Prev: PackageLoader class-accessing,  Up: PackageLoader

1.126.2 PackageLoader class: loading
------------------------------------

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.126.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.127 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.127.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.127.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.127.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.128 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.128.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:

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.128.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.129 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.129.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.129.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.130 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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.131 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-compiling::  (instance)
* PositionableStream-positioning::  (instance)
* PositionableStream-still unclassified::  (instance)
* PositionableStream-testing::  (instance)
* PositionableStream-truncating::  (instance)


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

1.131.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.131.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 data on which the receiver is streaming, from the
     start-th item to the end-th.  Note that this method is 0-based,
     unlike the one in Collection, because a Stream's #position method
     returns 0-based values.

next
     Answer the next item of the receiver.  Returns nil when at end of
     stream.

nextAvailable: anInteger into: aCollection startingAt: pos
     Place up to anInteger objects from the receiver into aCollection,
     starting from position pos in the collection and stopping if no
     more data is available.

nextAvailable: anInteger putAllOn: aStream
     Copy up to anInteger objects from the receiver into aStream,
     stopping if no more data is available.

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.

readStream
     Answer a ReadStream on the same contents as the receiver

reverseContents
     Returns a collection of the same type that the stream accesses, up
     to and including the final element, but in reverse order.

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.

upToEnd
     Returns a collection of the same type that the stream accesses,
     containing the entire rest of the stream's contents.



File: gst-base.info,  Node: PositionableStream-class type methods,  Next: PositionableStream-compiling,  Prev: PositionableStream-accessing-reading,  Up: PositionableStream

1.131.3 PositionableStream: class type methods
----------------------------------------------

isExternalStream
     We stream on a collection residing in the image, so answer false

species
     Return the type of the collections returned by #upTo: etc., which
     are the same kind as those returned by the collection with methods
     such as #select:.



File: gst-base.info,  Node: PositionableStream-compiling,  Next: PositionableStream-positioning,  Prev: PositionableStream-class type methods,  Up: PositionableStream

1.131.4 PositionableStream: compiling
-------------------------------------

name
     Answer a string that represents what the receiver is streaming on

segmentFrom: startPos to: endPos
     Answer an object that, when sent #asString, will yield the result
     of sending `copyFrom: startPos to: endPos' to the receiver



File: gst-base.info,  Node: PositionableStream-positioning,  Next: PositionableStream-still unclassified,  Prev: PositionableStream-compiling,  Up: PositionableStream

1.131.5 PositionableStream: positioning
---------------------------------------

basicPosition: anInteger
     Move the stream pointer to the anInteger-th object

isPositionable
     Answer true if the stream supports moving backwards with #skip:.

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.



File: gst-base.info,  Node: PositionableStream-still unclassified,  Next: PositionableStream-testing,  Prev: PositionableStream-positioning,  Up: PositionableStream

1.131.6 PositionableStream: still unclassified
----------------------------------------------

nextPutAllOn: aStream
     Write all the objects in the receiver to aStream.



File: gst-base.info,  Node: PositionableStream-testing,  Next: PositionableStream-truncating,  Prev: PositionableStream-still unclassified,  Up: PositionableStream

1.131.7 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.131.8 PositionableStream: truncating
--------------------------------------

truncate
     Truncate the receiver to the current position - only valid for
     writing streams



File: gst-base.info,  Node: Process,  Next: ProcessEnvironment,  Prev: PositionableStream,  Up: Base classes

1.132 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-debugging::  (instance)
* Process-printing::  (instance)


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

1.132.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.

suspendedContext
     Answer the context that the process was executing at the time it
     was suspended.

suspendedContext: aContext
     Modify 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.132.2 Process: basic
----------------------

context
     Return the execution context of the receiver.

debugger
     Return the object in charge of debugging the receiver.  This
     always returns nil unless the DebugTools package is loaded.

finalize
     Terminate processes that are GCed while waiting on a dead
     semaphore.

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:.

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.

terminateOnQuit
     Mark the receiver so that it is terminated when ObjectMemory
     class>>#quit: is sent.



File: gst-base.info,  Node: Process-builtins,  Next: Process-debugging,  Prev: Process-basic,  Up: Process

1.132.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.

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

yield
     Yield control from the receiver to other processes



File: gst-base.info,  Node: Process-debugging,  Next: Process-printing,  Prev: Process-builtins,  Up: Process

1.132.4 Process: debugging
--------------------------

detach
     Do nothing, instances of Process are already detached.



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

1.132.5 Process: printing
-------------------------

printOn: aStream
     Print a representation of the receiver on aStream



File: gst-base.info,  Node: ProcessEnvironment,  Next: ProcessorScheduler,  Prev: Process,  Up: Base classes

1.133 ProcessEnvironment
========================

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Processes
     I represent a proxy for thread-local variables defined for
     Smalltalk processes.  Associations requested to me retrieve the
     thread-local value for the current process.  For now, I don't
     provide the full protocol of a Dictionary; in particular the
     iteration protocol is absent.

* Menu:

* ProcessEnvironment class-disabled::  (class)
* ProcessEnvironment class-singleton::  (class)
* ProcessEnvironment-accessing::  (instance)
* ProcessEnvironment-dictionary removing::  (instance)
* ProcessEnvironment-dictionary testing::  (instance)


File: gst-base.info,  Node: ProcessEnvironment class-disabled,  Next: ProcessEnvironment class-singleton,  Up: ProcessEnvironment

1.133.1 ProcessEnvironment class: disabled
------------------------------------------

new
     This method should not be called for instances of this class.



File: gst-base.info,  Node: ProcessEnvironment class-singleton,  Next: ProcessEnvironment-accessing,  Prev: ProcessEnvironment class-disabled,  Up: ProcessEnvironment

1.133.2 ProcessEnvironment class: singleton
-------------------------------------------

uniqueInstance
     Return the singleton instance of ProcessEnvironment.



File: gst-base.info,  Node: ProcessEnvironment-accessing,  Next: ProcessEnvironment-dictionary removing,  Prev: ProcessEnvironment class-singleton,  Up: ProcessEnvironment

1.133.3 ProcessEnvironment: accessing
-------------------------------------

add: newObject
     Add the newObject association to the receiver

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

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

at: key
     Answer the value associated to the given key. Return nil 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: key ifAbsentPut: aBlock
     Answer the value associated to the given key, setting it to the
     result of evaluating aBlock if the key is not found.

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

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

keys
     Answer a kind of Set containing the keys of the receiver



File: gst-base.info,  Node: ProcessEnvironment-dictionary removing,  Next: ProcessEnvironment-dictionary testing,  Prev: ProcessEnvironment-accessing,  Up: ProcessEnvironment

1.133.4 ProcessEnvironment: dictionary removing
-----------------------------------------------

remove: anAssociation
     Remove anAssociation's key from the dictionary

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

removeAllKeys: keys
     Remove all the keys in keys, without raising any errors

removeAllKeys: keys ifAbsent: aBlock
     Remove all the keys in keys, passing the missing keys as parameters
     to aBlock as they're encountered

removeKey: aSymbol
     Remove the aSymbol key from the dictionary

removeKey: aSymbol ifAbsent: aBlock
     Remove the aSymbol key from the dictionary



File: gst-base.info,  Node: ProcessEnvironment-dictionary testing,  Prev: ProcessEnvironment-dictionary removing,  Up: ProcessEnvironment

1.133.5 ProcessEnvironment: dictionary testing
----------------------------------------------

includesKey: key
     Answer whether the receiver contains the given key



File: gst-base.info,  Node: ProcessorScheduler,  Next: ProcessVariable,  Prev: ProcessEnvironment,  Up: Base classes

1.134 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.134.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.134.2 ProcessorScheduler: basic
---------------------------------

activeDebugger
     Answer the active process' debugger

activePriority
     Answer the active process' priority

activeProcess
     Answer the active process

processEnvironment
     Answer another singleton object hosting thread-local variables for
     the Smalltalk processes.  This acts like a normal Dictionary with
     a couple of differences: a) using #associationAt: will return
     special associations that retrieve a thread-local value; b)
     requesting missing keys will return nil, and removing them will be
     a nop.

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.134.3 ProcessorScheduler: built ins
-------------------------------------

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.134.4 ProcessorScheduler: idle tasks
--------------------------------------

idle
     Private - Call the next idle task.  Return whether GNU Smalltalk
     should pause until the next OS signal.

idleAdd: aBlock
     Register aBlock to be executed when things are idle

initialize
     Private - Start the finalization process.

pause: aBoolean
     Private - Pause for some time if aBoolean is false, or until a
     signal if it is true.

startFinalizers
     Private - Fire a low-priority process to finalize the objects

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.134.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.134.6 ProcessorScheduler: priorities
--------------------------------------

highIOPriority
     Answer the priority for system high-priority I/O processes, such
     as a process handling input from a network.

highestPriority
     Answer the highest valid priority

idlePriority
     Answer the priority of idle processes.

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.

lowestPriority
     Answer the lowest valid priority

priorityName: priority
     Private - Answer a name for the given process priority

systemBackgroundPriority
     Answer the priority for system background-priority processes.  An
     incremental garbage collector could run at this level but now it
     runs at idlePriority instead.

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.134.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.134.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
     Signal 'aSemaphore' when the given C signal occurs.



File: gst-base.info,  Node: ProcessVariable,  Next: Promise,  Prev: ProcessorScheduler,  Up: Base classes

1.135 ProcessVariable
=====================

Defined in namespace Smalltalk
Superclass: LookupKey
Category: Language-Processes
     I represent a proxy for a thread-local variable defined for a
     process.  Requesting the value will return the thread-local
     setting for the current process.

* Menu:

* ProcessVariable class-accessing::  (class)
* ProcessVariable-accessing::  (instance)


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

1.135.1 ProcessVariable class: accessing
----------------------------------------

key: anObject
     Return a new ProcessVariable with the given key.  Not that the key
     need not be a symbol or string, for example you could use an array
     #(#{class name} 'name').  Setting the variable's value will
     automatically create it in the current process, while removal must
     be done by hand through the ProcessEnvironment singleton object.

new
     Return a new ProcessVariable with a new anonymous but unique key.
     It is suggested to use a descriptive name instead to ease
     debugging.  Setting the variable's value will automatically create
     it in the current process, while removal must be done by hand
     through the ProcessEnvironment singleton object.



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

1.135.2 ProcessVariable: accessing
----------------------------------

environment
     Return the environment in which this ProcessVariable lives.  This
     is the singleton instance of ProcessEnvironment for all variables.

use: anObject during: aBlock
     Set the value of this variable to anObject during the execution of
     aBlock, then restore it.

value
     Return the value of this variable in the current process.

value: anObject
     Set the value of the current process's copy of the variable to be
     anObject.

valueIfAbsent: aBlock
     Return the value of this variable in the current process.



File: gst-base.info,  Node: Promise,  Next: Random,  Prev: ProcessVariable,  Up: Base classes

1.136 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)
* Promise-still unclassified::  (instance)


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

1.136.1 Promise class: creating instances
-----------------------------------------

for: aBlock
     Invoke aBlock at an indeterminate time in an indeterminate process
     before answering its value from #value sent to my result.

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.136.2 Promise: accessing
--------------------------

hasError
     Answer whether calling #value will raise an exception.

hasValue
     Answer whether we already have a value (or calling #value will
     raise an error).

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.136.3 Promise: initializing
-----------------------------

initialize
     Private - set the initial state of the receiver



File: gst-base.info,  Node: Promise-printing,  Next: Promise-still unclassified,  Prev: Promise-initializing,  Up: Promise

1.136.4 Promise: printing
-------------------------

printOn: aStream
     Print a representation of the receiver



File: gst-base.info,  Node: Promise-still unclassified,  Prev: Promise-printing,  Up: Promise

1.136.5 Promise: still unclassified
-----------------------------------

errorValue: anException
     Private - Raise anException whenever #value is called.



File: gst-base.info,  Node: Random,  Next: ReadStream,  Prev: Promise,  Up: Base classes

1.137 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.137.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.137.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)

source
     Return a standard source of random numbers.



File: gst-base.info,  Node: Random-basic,  Next: Random-testing,  Prev: Random class-shortcuts,  Up: Random

1.137.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.137.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.138 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)


File: gst-base.info,  Node: ReadStream class-instance creation,  Up: ReadStream

1.138.1 ReadStream class: instance creation
-------------------------------------------

on: aCollection
     Answer a new stream working on aCollection from its start.

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: ReadWriteStream,  Next: Rectangle,  Prev: ReadStream,  Up: Base classes

1.139 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.139.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.

on: aCollection from: firstIndex to: lastIndex
     Answer an instance of the receiver streaming from the
     firstIndex-th item of aCollection to the lastIndex-th

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.139.2 ReadWriteStream: positioning
------------------------------------

contents
     Unlike WriteStreams, ReadWriteStreams return the whole contents of
     the underlying collection.



File: gst-base.info,  Node: Rectangle,  Next: RecursionLock,  Prev: ReadWriteStream,  Up: Base classes

1.140 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.140.1 Rectangle class: instance creation
------------------------------------------

left: leftNumber right: rightNumber top: topNumber bottom: bottomNumber
     Answer a rectangle with the given coordinates

left: leftNumber top: topNumber right: rightNumber 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.140.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.140.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.140.4 Rectangle: printing
---------------------------

printOn: aStream
     Print a representation of the receiver on aStream

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


