view CbC-examples/rectypeTest/instruct.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 <stdlib.h>

struct interface {
	__rectype *next;
};


__code print(struct interface p) {
	puts("print");
	exit(0);
}

__code csA(struct interface p) {
	struct interface ds = { csA };
	goto p.next(ds);
}

void main1() {
	struct interface ds = { print };
	goto csA(ds);
}

int main() {
	main1();
	return 0;
}