diff CbC-examples/rectypeTest/rectypeTest1.c @ 105:b3cfc7733d3f

fix bug. implementation fo rectype. c-family/c-pretty-print.c
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Fri, 25 May 2012 10:34:23 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CbC-examples/rectypeTest/rectypeTest1.c	Fri May 25 10:34:23 2012 +0900
@@ -0,0 +1,22 @@
+#include <stdio.h>
+__code print(__rectype *p, int num) {
+  printf("num = %d\n",num);
+}
+
+__code csA(__rectype *p, int num) {
+  goto p(csA,3,4);
+  goto p(2,3);
+  goto p(csA,3);
+  return;
+}
+
+void funcA(__code (*p)()){
+  goto p(print, 3);
+  return;
+}
+
+int main() {
+  funcA(csA);
+
+  return 0;
+}