source: git/Tst/Short/branchTo.tst @ 1cf651

spielwiese
Last change on this file since 1cf651 was 1cf651, checked in by Hans Schoenemann <hannes@…>, 7 years ago
fix: return in branchTo
  • Property mode set to 100644
File size: 489 bytes
Line 
1LIB "tst.lib";
2tst_init();
3
4  proc p1(int i) { "int:",i; }
5  proc p21(string s) { "string:",s; }
6  proc p22(string s1, string s2) { "two strings:",s1,s2; }
7  proc p()
8  { branchTo("int",p1);
9    branchTo("string","string",p22);
10    branchTo("string",p21);
11    ERROR("not defined for these argument types");
12  }
13  p(1);
14  p("hu");
15  p("ha","ha");
16// returning stuff:
17proc square(int i){return(i^2);};
18proc tst(){branchTo("int",square); ERROR("No method found");}
19tst(2);
20
21tst_status(1);$;
22
Note: See TracBrowser for help on using the repository browser.