mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-24 11:41:02 +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
|