home *** CD-ROM | disk | FTP | other *** search
- *
- * Little Smalltalk, version 2
- * Written by Tim Budd, Oregon State University, July 1987
- *
- * unix specific routines for the multiprocess front end
- *
- *
- Class Smalltalk
- commandLoop | string |
- self openFiles.
- scheduler new.
- [ string <- stdin getPrompt: '> '. string notNil ]
- whileTrue: [ (string size strictlyPositive)
- ifTrue: [ self doIt: string ] ]
- |
- doIt: aString | method |
- method <- Method new.
- method text: ( 'proceed ', aString ).
- (method compileWithClass: Object)
- ifTrue: [ method executeWith: #( 1 ).
- scheduler run ]
- |
- error: aString | process |
- stderr print: 'Error: ', aString.
- scheduler critical:
- [ process <- scheduler currentProcess.
- scheduler removeProcess: process].
- " flush out current process "
- scheduler currentProcess yield.
- " could we do traceback here?"
- ]
-