
Script started on Thu Apr 10 16:16:40 1997
bennet 1000%gst -q
Smalltalk 1.1.5 Ready
st> 'Hello, world' printNl !
'Hello, world'
st> 187 printNl !
187
st> 14 + 34 printNl !
34
st> (14 + 34) printNl !
48
st> 'Yes ' printNl; printNl; printNl !
'Yes '
'Yes '
'Yes '
st> Smalltalk at: #x put: 18 !
st> x printNl !
18
st> x := Array new: 10 !
st> x printNl !
(nil nil nil nil nil nil nil nil nil nil )
st> x at: 1 put: 99 !
st> x at: 3 put: 208 !
st> x at: 7 put: 'Howdy!' !
st> x printNl !
(99 nil 208 nil nil nil 'Howdy!' nil nil nil )
st> (x at: 3) printNl !
208
st> (x at: 4) printNl !
nil
st> x at: 2 put: 2.1; at: 8 put: 'Smudge'; printNl !
(99 2.1 208 nil nil nil 'Howdy!' 'Smudge' nil nil )
st> Smalltalk at: #fred put: [8 + 9] !
st> (fred value) printNl !
17
st> Smalltalk at: #barney put: [:x | x + 1] !
st> (barney value: 3) printNl !
4
st> Smalltalk at: #max put: [:x :y | (x < y) ifTrue: [y] ifFalse: [x] ] !
st> (max value: 4 value: 5) printNl !
5
st> (max value: 7 value: 3) printNl !
7
st> (Integer comment) printNl !
'I am the integer class of the GNU Smalltalk system. My instances can
represent 31 bit integers and are as efficient as possible.'
st> FileStream fileIn: 'frog.st' !
st> (Frog comment) printNl !
'I am a frog. I can croak, and I remember how many times I have croaked.'
st> Smalltalk at: #f put: Frog new !
st> f croak !
'ribBIT'
st> f croak; croak; croak !
'ribBIT'
'ribBIT'
'ribBIT'
st> (f getCroakCount) printNl !
4
st> (f croak; croak; getCroakCount) printNl !
'ribBIT'
'ribBIT'
6
st> ^D
bennet 1002%