ack/lang/basic/lib/mki.c

35 lines
430 B
C
Raw Normal View History

#include "bc_string.h"
1984-11-29 14:22:02 +00:00
1985-01-21 12:47:04 +00:00
/* $Header$ */
1984-11-29 14:22:02 +00:00
String *_mki(i)
1985-02-08 13:12:51 +00:00
long i;
1984-11-29 14:22:02 +00:00
{
1985-02-08 13:12:51 +00:00
char *buffer =" ";
1984-11-29 14:22:02 +00:00
String *s;
s= _newstr(buffer);
1985-02-08 13:12:51 +00:00
* ( (long *)s->strval ) = i ;
1984-11-29 14:22:02 +00:00
return(s);
}
String *_mkd(d)
double d;
{
char *buffer =" ";
String *s;
s= _newstr(buffer);
* ( (double *)s->strval ) = d ;
1984-11-29 14:22:02 +00:00
return(s);
}
1985-02-08 13:12:51 +00:00
long _cvi(s)
1984-11-29 14:22:02 +00:00
String *s;
{
1985-02-08 13:12:51 +00:00
return *( (long *) s->strval) ;
1984-11-29 14:22:02 +00:00
}
double _cvd(s)
String *s;
{
1985-02-08 13:12:51 +00:00
return *( (double *) s->strval) ;
1984-11-29 14:22:02 +00:00
}