On Apr 1, 2008, at 6:59 AM, Michael Haupt wrote:
Dear all,
is it somehow possible to have, in Jolt, the equivalent of the
following C code?
void f() {
static int x = 0;
...
x++;
...
}
(define Integer (import "Integer"))
(define calloc (dlsym "calloc"))
(syntax static
(lambda (node compiler)
[Integer value_: (calloc 1 [[node second] _integerValue])]))
(define f
(lambda ()
(let ((x (static 4)))
(incr (long@ x)))))
(printf "%d\n" (f))
(printf "%d\n" (f))
(printf "%d\n" (f))
(printf "%d\n" (f))
(printf "%d\n" (f))
_______________________________________________
fonc mailing list
[email protected]
http://vpri.org/mailman/listinfo/fonc