This is the mail archive of the
guile@cygnus.com
mailing list for the Guile project.
How to use a scheme function with C...
- To: guile@cygnus.com
- Subject: How to use a scheme function with C...
- From: Ariel Rios <jarios@usa.net>
- Date: Sat, 05 Jun 1999 14:45:25 -0500
I'd been using Guile for a while but only in scheme-only projects. Right
I need to create a C program that at run-time may be able to use the
guile interpreter and call a specific scheme function.
For example let's suppose I want to create a C programe that receives a
value and then call the function factorial declared in Scheme.
"void main(){
int a;
name_of_function (a){ ;;this function should start the guile interpreter
and evaluate
(define (factorial n).... ;;the function factorial.
.....
..... } }
As far as I remember that was possible using some guile functions.
However, I lost the documentation I had from Guile and cannot fing it
again.
Ariel Rios