minor fixes

This commit is contained in:
Torsten Ruger
2015-11-08 23:58:54 +02:00
parent f746218765
commit b2de1c6d79
5 changed files with 9 additions and 8 deletions

View File

@ -9,13 +9,13 @@ class Integer < Value
end
Word as_string(Word str)
if_plus( self - 10 )
if_minus( self - 10 )
int num = digit()
str = str.add_digit( num )
return str
else
int rest = self / 10
str = rest.as_string( str )
end
int rest = self / 10
str = rest.as_string( str )
return str
end

View File

@ -3,7 +3,7 @@ class Word < Object
get_internal(index)
end
Word add_digit( int i)
int l = self.char_length
int l = self.char_length + 2
set_internal( l , i)
return self
end