-
Notifications
You must be signed in to change notification settings - Fork 1
/
evaluate.cbl
61 lines (42 loc) · 1.72 KB
/
evaluate.cbl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
identification division.
program-id. evaluate-example.
data division.
working-storage section.
77 animal pic 9.
88 chien value 1.
88 chat value 2.
88 poisson value 3.
88 serpent value 4.
88 requin value 5.
procedure division.
*>************************************************
*> evaluate sans utilisation des noms condition *
*>************************************************
move 2 to animal
perform evaluate-1. *> mammifère
move 5 to animal
perform evaluate-1. *> reptile
*>************************************************
*> evaluate avec utilisation des noms condition *
*>************************************************
move 2 to animal
perform evaluate-2. *> animal
move 5 to animal
perform evaluate-2. *> poisson
goback.
evaluate-1.
evaluate animal
when 1 thru 2 display "mammifère"
*> not supported by OpenCobol 1.1.0
*>when 3 also 5 display "poisson"
when other display "reptile"
end-evaluate
.
evaluate-2.
evaluate true
when chien thru chat display "mammifère"
when poisson or requin display "poisson"
when any display "animal"
when other display "pas animal"
end-evaluate
.