ack/lang/basic/lib/mki.c
2016-12-12 21:16:32 +01:00

31 lines
402 B
C

#include "bc_string.h"
/* $Id$ */
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);
}