repo.or.cz
/
williamcminus.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
finished 19 (not fully tested...)
[williamcminus.git]
/
assign6
/
case.txt
blob
9ab61e4357ec02494e4a5407c8f6ac382cdd537c
1
BEGIN {CASE statements}
2
i := 3; ch := 'b';
3
4
CASE i+1 OF
5
1: j := i;
6
4: j := 4*i;
7
5, 2, 3: j := 523*i;
8
END;
9
10
CASE ch OF
11
'c', 'b' : str := 'p';
12
'a' : str := 'q'
13
END;
14
15
FOR i := -5 TO 15 DO BEGIN
16
CASE i OF
17
2: prime := i;
18
-4, -2, 0, 4, 6, 8, 10, 12: even := i;
19
-3, -1, 1, 3, 5, 7, 9, 11: CASE i OF
20
-3, -1, 1, 9: odd := i;
21
2, 3, 5, 7, 11: prime := i;
22
END
23
END
24
END
25
END.