view CbC-examples/rectypeTest/typedef.cbc @ 106:85047c4f1ca4

add CbC-examples/rectypeTest
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Wed, 13 Jun 2012 17:18:58 +0900
parents
children a3a2f64cf8f4
line wrap: on
line source

#include <stdio.h>

//typedef __code (*csPtr)(__rectype);
typedef __code (*csPtr)(__rectype*); // TODO:  error 


//__code print(csPtr p ) { TODO:
__code print(__rectype *p ) {
	puts("hello");
}

//__code func(csPtr p ) { TODO:
__code func(__rectype *p ) {
	goto p(func);
}


int main() {
	goto func(print);
	return 0;
}