source: to-imperative/trunk/samples/Syntax/trap1.rf @ 4085

Last change on this file since 4085 was 4026, checked in by orlov, 12 years ago
  • Tests for $trap...$with construction.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 232 bytes
Line 
1$use StdIO;
2
3$func F = e;
4$func G = ;
5
6F = {
7  {
8    $trap $error XXX $with {
9      e1 = $error e1;
10    };
11    YYY;
12  } :: e1 =
13    e1;
14  ZZZ;
15};
16
17G = $trap <PrintLn <F>> $with {
18  e1 = <PrintLn e1>;
19};
20
21$func Main = e;
22Main = <G>;
Note: See TracBrowser for help on using the repository browser.