checkin from browser
authorClaus Gittinger <cg@exept.de>
Tue, 20 Feb 1996 20:35:01 +0100
changeset 973 5bb2473bf1ef
parent 972 76cd3ca837e4
child 974 4697d6bdca7d
checkin from browser
Number.st
PosStream.st
PositionableStream.st
--- a/Number.st	Tue Feb 20 20:31:08 1996 +0100
+++ b/Number.st	Tue Feb 20 20:35:01 1996 +0100
@@ -11,10 +11,10 @@
 "
 
 ArithmeticValue subclass:#Number
-	 instanceVariableNames:''
-	 classVariableNames:''
-	 poolDictionaries:''
-	 category:'Magnitude-Numbers'
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Magnitude-Numbers'
 !
 
 !Number class methodsFor:'documentation'!
@@ -50,67 +50,67 @@
 
     str := aStringOrStream readStream.
 
-    Object errorSignal handle:[:ex |
-	^ exceptionBlock value
+    ErrorSignal handle:[:ex |
+        ^ exceptionBlock value
     ] do:[
-	nextChar := str skipSeparators.
-	nextChar isNil ifTrue:[^ exceptionBlock value].
+        nextChar := str skipSeparators.
+        nextChar isNil ifTrue:[^ exceptionBlock value].
 
-	freakOut := [^ exceptionBlock value].
+        freakOut := [^ exceptionBlock value].
 
-	(nextChar == $-) ifTrue:[
-	    negative := true.
-	    nextChar := str nextPeek
-	] ifFalse:[
-	    negative := false.
-	    (nextChar == $+) ifTrue:[
-		nextChar := str nextPeek
-	    ]
-	].
-	nextChar isDigit ifFalse:[
-	    ^ exceptionBlock value.
+        (nextChar == $-) ifTrue:[
+            negative := true.
+            nextChar := str nextPeek
+        ] ifFalse:[
+            negative := false.
+            (nextChar == $+) ifTrue:[
+                nextChar := str nextPeek
+            ]
+        ].
+        nextChar isDigit ifFalse:[
+            ^ exceptionBlock value.
 "/          value := super readFrom:str.
 "/          negative ifTrue:[value := value negated].
 "/          ^ value
-	].
-	value := Integer readFrom:str radix:10 onError:freakOut.
-	nextChar := str peek.
-	((nextChar == $r) or:[ nextChar == $R]) ifTrue:[
-	    str next.
-	    radix := value.
-	    value := Integer readFrom:str radix:radix onError:freakOut.
-	] ifFalse:[
-	    radix := 10
-	].
-	(nextChar == $.) ifTrue:[
-	    nextChar := str nextPeek.
-	    (nextChar notNil and:[nextChar isDigitRadix:radix]) ifTrue:[
-		value := value asFloat 
-			 + (Number readMantissaFrom:str radix:radix).
-		nextChar := str peek
-	    ]
-	].
-	((nextChar == $e) or:[nextChar == $E]) ifTrue:[
-	    nextChar := str nextPeek.
-	    signExp := 1.
-	    (nextChar == $+) ifTrue:[
-		nextChar := str nextPeek
-	    ] ifFalse:[
-		(nextChar == $-) ifTrue:[
-		    nextChar := str nextPeek.
-		    signExp := -1
-		]
-	    ].
-	    (nextChar notNil and:[(nextChar isDigitRadix:radix)]) ifTrue:[
-		value := value asFloat 
-			 * (10.0 raisedToInteger:
-				    ((Integer readFrom:str radix:radix onError:freakOut) * signExp))
-	    ]
-	].
-	negative ifTrue:[
-	    ^ value negated
-	].
-	^ value
+        ].
+        value := Integer readFrom:str radix:10 onError:freakOut.
+        nextChar := str peek.
+        ((nextChar == $r) or:[ nextChar == $R]) ifTrue:[
+            str next.
+            radix := value.
+            value := Integer readFrom:str radix:radix onError:freakOut.
+        ] ifFalse:[
+            radix := 10
+        ].
+        (nextChar == $.) ifTrue:[
+            nextChar := str nextPeek.
+            (nextChar notNil and:[nextChar isDigitRadix:radix]) ifTrue:[
+                value := value asFloat 
+                         + (Number readMantissaFrom:str radix:radix).
+                nextChar := str peek
+            ]
+        ].
+        ((nextChar == $e) or:[nextChar == $E]) ifTrue:[
+            nextChar := str nextPeek.
+            signExp := 1.
+            (nextChar == $+) ifTrue:[
+                nextChar := str nextPeek
+            ] ifFalse:[
+                (nextChar == $-) ifTrue:[
+                    nextChar := str nextPeek.
+                    signExp := -1
+                ]
+            ].
+            (nextChar notNil and:[(nextChar isDigitRadix:radix)]) ifTrue:[
+                value := value asFloat 
+                         * (10.0 raisedToInteger:
+                                    ((Integer readFrom:str radix:radix onError:freakOut) * signExp))
+            ]
+        ].
+        negative ifTrue:[
+            ^ value negated
+        ].
+        ^ value
     ]
 
     "
@@ -122,7 +122,7 @@
      '+00000123.45' asNumber  
     "
 
-    "Modified: 16.11.1995 / 22:49:04 / cg"
+    "Modified: 20.2.1996 / 20:24:19 / cg"
 !
 
 readSmalltalkSyntaxFrom:aStream
@@ -480,5 +480,5 @@
 !Number class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Number.st,v 1.26 1996-02-01 19:43:54 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Number.st,v 1.27 1996-02-20 19:34:33 cg Exp $'
 ! !
--- a/PosStream.st	Tue Feb 20 20:31:08 1996 +0100
+++ b/PosStream.st	Tue Feb 20 20:35:01 1996 +0100
@@ -11,10 +11,10 @@
 "
 
 PeekableStream subclass:#PositionableStream
-	 instanceVariableNames:'collection position readLimit writeLimit'
-	 classVariableNames:'ErrorDuringFileInSignal ChunkSeparator'
-	 poolDictionaries:''
-	 category:'Streams'
+	instanceVariableNames:'collection position readLimit writeLimit'
+	classVariableNames:'ErrorDuringFileInSignal ChunkSeparator'
+	poolDictionaries:''
+	category:'Streams'
 !
 
 !PositionableStream class methodsFor:'documentation'!
@@ -408,44 +408,46 @@
      catch any errors during fileIn 
      - offer debug/abort/continue choice
     "
-    Object errorSignal handle:[:ex |
-	|action what sender|
+    ErrorSignal handle:[:ex |
+        |action what sender|
 
-	what := ex errorString.
-	what isNil ifTrue:[
-	    what := ex signal notifierString.
-	].
+        what := ex errorString.
+        what isNil ifTrue:[
+            what := ex signal notifierString.
+        ].
 
-	"handle the case where no GUI has been built in,
-	 just abort the fileIn with a notification"
+        "handle the case where no GUI has been built in,
+         just abort the fileIn with a notification"
 
-	Display isNil ifTrue:[
-	    sender := ex suspendedContext sender.
-	    self notify:(what , 
-			 ' in ' , sender receiver class name ,
-			 '>>>' , sender selector).
-	    ex return
-	].
+        Display isNil ifTrue:[
+            sender := ex suspendedContext sender.
+            self notify:(what , 
+                         ' in ' , sender receiver class name ,
+                         '>>>' , sender selector).
+            ex return
+        ].
 
-	"otherwise ask what should be done now and either
-	 continue or abort the fileIn"
+        "otherwise ask what should be done now and either
+         continue or abort the fileIn"
 
-	action := self askForDebug:('error in fileIn: ' , what) withCRs.
-	action == #continue ifTrue:[
-	    ex proceed
-	].
-	action == #abort ifTrue:[
-	    ex return
-	].
+        action := self askForDebug:('error in fileIn: ' , what) withCRs.
+        action == #continue ifTrue:[
+            ex proceed
+        ].
+        action == #abort ifTrue:[
+            ex return
+        ].
 "/        Debugger enter:ex suspendedContext
-	(ex signal) enterDebuggerWith:ex message:what.
-	ex reject
+        (ex signal) enterDebuggerWith:ex message:what.
+        ex reject
     ] do:[
-	[self atEnd] whileFalse:[
-	    lastValue := self fileInNextChunkNotifying:someone passChunk:passChunk
-	]
+        [self atEnd] whileFalse:[
+            lastValue := self fileInNextChunkNotifying:someone passChunk:passChunk
+        ]
     ].
     ^ lastValue
+
+    "Modified: 20.2.1996 / 20:24:49 / cg"
 ! !
 
 !PositionableStream methodsFor:'positioning'!
@@ -555,6 +557,6 @@
 !PositionableStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/PosStream.st,v 1.38 1996-01-17 12:27:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/PosStream.st,v 1.39 1996-02-20 19:35:01 cg Exp $'
 ! !
 PositionableStream initialize!
--- a/PositionableStream.st	Tue Feb 20 20:31:08 1996 +0100
+++ b/PositionableStream.st	Tue Feb 20 20:35:01 1996 +0100
@@ -11,10 +11,10 @@
 "
 
 PeekableStream subclass:#PositionableStream
-	 instanceVariableNames:'collection position readLimit writeLimit'
-	 classVariableNames:'ErrorDuringFileInSignal ChunkSeparator'
-	 poolDictionaries:''
-	 category:'Streams'
+	instanceVariableNames:'collection position readLimit writeLimit'
+	classVariableNames:'ErrorDuringFileInSignal ChunkSeparator'
+	poolDictionaries:''
+	category:'Streams'
 !
 
 !PositionableStream class methodsFor:'documentation'!
@@ -408,44 +408,46 @@
      catch any errors during fileIn 
      - offer debug/abort/continue choice
     "
-    Object errorSignal handle:[:ex |
-	|action what sender|
+    ErrorSignal handle:[:ex |
+        |action what sender|
 
-	what := ex errorString.
-	what isNil ifTrue:[
-	    what := ex signal notifierString.
-	].
+        what := ex errorString.
+        what isNil ifTrue:[
+            what := ex signal notifierString.
+        ].
 
-	"handle the case where no GUI has been built in,
-	 just abort the fileIn with a notification"
+        "handle the case where no GUI has been built in,
+         just abort the fileIn with a notification"
 
-	Display isNil ifTrue:[
-	    sender := ex suspendedContext sender.
-	    self notify:(what , 
-			 ' in ' , sender receiver class name ,
-			 '>>>' , sender selector).
-	    ex return
-	].
+        Display isNil ifTrue:[
+            sender := ex suspendedContext sender.
+            self notify:(what , 
+                         ' in ' , sender receiver class name ,
+                         '>>>' , sender selector).
+            ex return
+        ].
 
-	"otherwise ask what should be done now and either
-	 continue or abort the fileIn"
+        "otherwise ask what should be done now and either
+         continue or abort the fileIn"
 
-	action := self askForDebug:('error in fileIn: ' , what) withCRs.
-	action == #continue ifTrue:[
-	    ex proceed
-	].
-	action == #abort ifTrue:[
-	    ex return
-	].
+        action := self askForDebug:('error in fileIn: ' , what) withCRs.
+        action == #continue ifTrue:[
+            ex proceed
+        ].
+        action == #abort ifTrue:[
+            ex return
+        ].
 "/        Debugger enter:ex suspendedContext
-	(ex signal) enterDebuggerWith:ex message:what.
-	ex reject
+        (ex signal) enterDebuggerWith:ex message:what.
+        ex reject
     ] do:[
-	[self atEnd] whileFalse:[
-	    lastValue := self fileInNextChunkNotifying:someone passChunk:passChunk
-	]
+        [self atEnd] whileFalse:[
+            lastValue := self fileInNextChunkNotifying:someone passChunk:passChunk
+        ]
     ].
     ^ lastValue
+
+    "Modified: 20.2.1996 / 20:24:49 / cg"
 ! !
 
 !PositionableStream methodsFor:'positioning'!
@@ -555,6 +557,6 @@
 !PositionableStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/PositionableStream.st,v 1.38 1996-01-17 12:27:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/PositionableStream.st,v 1.39 1996-02-20 19:35:01 cg Exp $'
 ! !
 PositionableStream initialize!