www.delorie.com/gnu/docs/guile/guile_151.html   search  
 
Buy GNU books!


Guile Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

19.8.1 C to Scheme

Function: SCM gh_bool2scm (int x)
Returns #f if x is zero, #t otherwise.

Function: SCM gh_ulong2scm (unsigned long x)
Function: SCM gh_long2scm (long x)
Function: SCM gh_double2scm (double x)
Function: SCM gh_char2scm (char x)
Returns a Scheme object with the value of the C quantity x.

Function: SCM gh_str2scm (char *s, int len)
Returns a new Scheme string with the (not necessarily null-terminated) C array s data.

Function: SCM gh_str02scm (char *s)
Returns a new Scheme string with the null-terminated C string s data.

Function: SCM gh_set_substr (char *src, SCM dst, int start, int len)
Copy len characters at src into the existing Scheme string dst, starting at start. start is an index into dst; zero means the beginning of the string.

If start + len is off the end of dst, signal an out-of-range error.

Function: SCM gh_symbol2scm (char *name)
Given a null-terminated string name, return the symbol with that name.

Function: SCM gh_ints2scm (int *dptr, int n)
Function: SCM gh_doubles2scm (double *dptr, int n)
Make a scheme vector containing the n ints or doubles at memory location dptr.

Function: SCM gh_chars2byvect (char *dptr, int n)
Function: SCM gh_shorts2svect (short *dptr, int n)
Function: SCM gh_longs2ivect (long *dptr, int n)
Function: SCM gh_ulongs2uvect (ulong *dptr, int n)
Function: SCM gh_floats2fvect (float *dptr, int n)
Function: SCM gh_doubles2dvect (double *dptr, int n)
Make a scheme uniform vector containing the n chars, shorts, longs, unsigned longs, floats or doubles at memory location dptr.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003