quakeforge/ruamoko/scheme/Number.r

27 lines
308 B
R

#include "Number.h"
#include "string.h"
@implementation Number
+ (id) newFromInt: (int) i
{
return [[self alloc] initWithInt: i];
}
- (id) initWithInt: (int) i
{
value = i;
return [super init];
}
- (int) intValue
{
return value;
}
- (string) printForm
{
return itos (value);
}
@end