Project

General

Profile

testcase.p

Adrian Lungu, 04/05/2021 04:30 AM

Download (864 Bytes)

 
1
define variable x as int.
2

    
3
x = 1.
4
case x:
5
   when 1 then do:
6
      do while true:
7
         quit.
8
      end.
9
   end.
10
   when 2 then do:
11
      do while true:
12
         leave.
13
      end.
14
   end.
15
   when 3 then do:
16
      do while true:
17
         stop.
18
      end.
19
   end.
20
   when 4 then do:
21
      do while true:
22
         return.
23
      end.
24
   end.
25
   when 5 then do:
26
      do while true:
27
         message "abc".
28
         quit.
29
      end.
30
   end.
31
   otherwise do:
32
      do while true:
33
         undo, leave.
34
      end.
35
   end.
36
end case.
37

    
38
case x:
39
   when 6 then do:
40
      quit.
41
   end.
42
   when 7 then do:
43
      leave.
44
   end.
45
   when 8 then do:
46
      stop.
47
   end.
48
   when 9 then do:
49
      return.
50
   end.
51
   when 10 then do:
52
      message "abc".
53
      quit.
54
   end.
55
   otherwise do:
56
      undo, leave.
57
   end.
58
end.