Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main () {
- test (3);
- }
- int go_to (Label label){ return label (); }
- int test1 (){
- print ("test1\n");
- return -1;
- }
- int test2 (){
- print ("test2\n");
- return -1;
- }
- int test3 (){
- print ("test3\n");
- return 1;
- }
- void test (int mode){
- switch(mode){
- case 1:
- go_to (test1);
- break;
- case 2:
- go_to (test2);
- break;
- case 3:
- test (go_to (test3));
- break;
- default:
- break;
- }
- }
- public delegate int Label ();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement