mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-19 11:10:55 +00:00
281b683e14
standard, implemented in Ruamoko. Currently works for a few simple "Hello, world!" programs.
27 lines
320 B
R
27 lines
320 B
R
#include "Number.h"
|
|
#include "string.h"
|
|
|
|
@implementation Number
|
|
|
|
+ (id) newFromInt: (integer) i
|
|
{
|
|
return [[self alloc] initWithInt: i];
|
|
}
|
|
|
|
- (id) initWithInt: (integer) i
|
|
{
|
|
value = i;
|
|
return [super init];
|
|
}
|
|
|
|
- (integer) intValue
|
|
{
|
|
return value;
|
|
}
|
|
|
|
- (string) printForm
|
|
{
|
|
return itos (value);
|
|
}
|
|
|
|
@end
|