changeset 56:aa2a9c95e294

add cbc_example_test.cbc
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sat, 16 Feb 2019 17:10:12 +0900
parents 86caceecf1c9
children e16c3d3e30b2
files prepaper/src/cbc_example_test.cbc
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/prepaper/src/cbc_example_test.cbc	Sat Feb 16 17:10:12 2019 +0900
@@ -0,0 +1,22 @@
+__code cg1(TEST testin){
+    TEST testout;
+    testout.number = testin.number + 1;
+    testout.string = testin.string;
+    goto cg2(testout);
+}
+
+__code cg2(TEST testin){
+    TEST testout;
+    testout.number = testin.number;
+    testout.string = "Hello";
+    goto cg3(testout);
+}
+
+__code cg3(TEST testin){
+    printf("number = %d\t string= %s\n",testin.number,testin.string);
+}
+
+int main(){
+    TEST test = {0,0};
+    goto cg1(test);
+}