diff 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 diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CbC-examples/rectypeTest/typedef.cbc	Wed Jun 13 17:18:58 2012 +0900
@@ -0,0 +1,21 @@
+#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;
+}