Object subclass: #SimpleCounter
instanceVariableNames: 'count '
classVariableNames: ''
poolDictionaries: ''
category: 'NU-Stuff'!
!SimpleCounter methodsFor: 'as yet unclassified' stamp: 'ss 9/22/2000 12:33'!
inc
count _ (count + 1) asNumber.! !
!SimpleCounter methodsFor: 'as yet unclassified' stamp: 'ss 9/22/2000 12:28'!
new
count _ 0.! !
!SimpleCounter methodsFor: 'as yet unclassified' stamp: 'ss 9/22/2000 12:30'!
val
^ count.! !
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
SimpleCounter class
instanceVariableNames: 'count '!
!SimpleCounter class methodsFor: 'as yet unclassified' stamp: 'ss 9/22/2000 12:39'!
inc
count _ count + 1.! !
!SimpleCounter class methodsFor: 'as yet unclassified' stamp: 'ss 9/22/2000 12:38'!
new
count _ 0.! !
!SimpleCounter class methodsFor: 'as yet unclassified' stamp: 'ss 9/22/2000 12:42'!
val
Transcript show: count asString.
^ count.! !