eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Infinity':

Home

everywhere
www.exept.de
for:
[back]

Class: Infinity


Inheritance:

   Object
   |
   +--Magnitude
      |
      +--ArithmeticValue
         |
         +--Number
            |
            +--MetaNumber
               |
               +--Infinity
                  |
                  +--Infinity::NegativeInfinity
                  |
                  +--Infinity::PositiveInfinity

Package:
stx:libbasic
Category:
Magnitude-Numbers
Version:
rev: ? date: ? ?
user: ?
file: ? directory: libbasic
module: stx stc-classLibrary: libbasic

Description:


This is a set of changes that adds infinity in the Number hierarchy.  
I have two instances representing positive and negative infinity.

Claus: fixed some minor bugs (args to errorUndefinedResult:) and some wrong comments.
       Changed retry:coercing: to match ST/X's way of doing this

Instance Variables :-
    positive <Boolean>      :       if true the instance represents positive
                                    infinity. if false, negative infinity


Class protocol:

class initialization
o  initialize

instance creation
o  negative
Return the unique instance of negative infinity

o  new

o  positive
Return the unique instance of positive infinity


Private classes:

    NegativeInfinity
    PositiveInfinity

Examples:


1 + Infinity positive Infinity positive + 1 Infinity positive + Infinity positive Infinity negative - 1 Infinity negative + Infinity negative Infinity negative + Infinity negative Infinity negative negated Infinity positive negated Infinity positive > Infinity negative Infinity negative > Infinity positive Infinity negative + Infinity positive -> raises an error Infinity negative - Infinity negative -> raises an error

ST/X 6.1.1; WebServer 1.620 at exept:8081; Wed, 23 May 2012 19:41:02 GMT