ack/lang/basic/lib/mki.c
2018-06-24 00:35:51 +02:00

29 lines
384 B
C

#include "lib.h"
String* _mki(long i)
{
char* buffer = " ";
String* s;
s = _newstr(buffer);
*((long*)s->strval) = i;
return (s);
}
String* _mkd(double d)
{
char* buffer = " ";
String* s;
s = _newstr(buffer);
*((double*)s->strval) = d;
return (s);
}
long _cvi(String* s)
{
return *((long*)s->strval);
}
double _cvd(String* s)
{
return *((double*)s->strval);
}