Welcome to the CHICKEN Scheme pasting service

foreign float madness added by alexcharlton on Mon Jun 16 19:01:51 2014

;;; test.scm
(import chicken scheme foreign)

(define foo
  (foreign-lambda void "foo" float))

(foo 0.1)
;;; end of test.scm

;;; external.c
#include <stdio.h> 

void foo(float bar){
    printf("foo got %f\n", bar);
}
;;; end of external.c

Compiled with `csc test.scm external.c`

./test --> foo got -0.000000

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which one-argument R5RS procedure returns 2 when given `'(1 2 3)' as input?
Visually impaired? Let me spell it for you (wav file) download WAV