[plt-scheme] [ANN] SuperC 2.0 --- Now with more evil

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Sat Nov 7 12:50:06 EST 2009

A new version of SuperC is available:


Here's an example:

#lang planet jaymccarthy/superc

 #include <stdio.h>
 #include <math.h>

(define-for-syntax y 6)

int main(void) {
 printf("The Scheme program contains: @|y|\n");
 return cos(M_PI);

(define main (get-ffi-obj-from-this 'main (_fun -> _int)))

(printf "The C program returned: ~a~n"

It outputs:

The Scheme program contains: 6
The C program returned: -1

Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University

"The glory of God is Intelligence" - D&C 93

Posted on the users mailing list.