2013-05-14 15:11:29 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
2018-06-23 22:35:51 +00:00
|
|
|
#include "lib.h"
|
1984-11-29 14:22:02 +00:00
|
|
|
|
2016-12-12 20:16:32 +00:00
|
|
|
String* _oct(int i)
|
1984-11-29 14:22:02 +00:00
|
|
|
{
|
|
|
|
char buffer[30];
|
2016-12-12 20:16:32 +00:00
|
|
|
sprintf(buffer, "%o", i);
|
|
|
|
return ((String*)_newstr(buffer));
|
1984-11-29 14:22:02 +00:00
|
|
|
}
|
|
|
|
|
2016-12-12 20:16:32 +00:00
|
|
|
String* _hex(int i)
|
1984-11-29 14:22:02 +00:00
|
|
|
{
|
|
|
|
char buffer[30];
|
1988-07-04 11:44:03 +00:00
|
|
|
|
2016-12-12 20:16:32 +00:00
|
|
|
sprintf(buffer, "%x", i);
|
|
|
|
return ((String*)_newstr(buffer));
|
1984-11-29 14:22:02 +00:00
|
|
|
}
|
1988-07-04 11:44:03 +00:00
|
|
|
|
2016-12-12 20:16:32 +00:00
|
|
|
String* _nstr(double f)
|
1988-07-04 11:44:03 +00:00
|
|
|
{
|
|
|
|
char buffer[80];
|
|
|
|
|
|
|
|
_str(f, buffer);
|
2016-12-12 20:16:32 +00:00
|
|
|
return (String*)_newstr(buffer);
|
1988-07-04 11:44:03 +00:00
|
|
|
}
|