Skip to content

SmallInt__printString

Sergi Reyner edited this page Mar 16, 2014 · 1 revision

#Class SmallInt

[back]

printString
	(self < 0) ifTrue: [ ^ '-' + self negated printString].
	(self < 10) ifTrue: [ ^ (Char new: (self + 48)) asString ]
	ifFalse: [ ^ (self quo: 10) printString + (self rem: 10) printString ]

Clone this wiki locally