repo.or.cz
/
sixpic.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
New version of the assembler, that does better branch generation.
[sixpic.git]
/
tests
/
control-structures
/
switch.c
blob
a85ab3d7fde38e9b5271c41cf5167cf61704453f
1
/* Switch */
2
3
void
f
(
int
x
,
int
n
)
4
{
5
while
(
n
>
0
)
6
{
7
switch
(
n
)
8
{
9
case
0
:
10
n
=
n
+
1
;
11
// break;
12
case
1
:
13
return
;
14
default
:
15
x
=
x
+
n
;
16
n
=
n
-
1
;
17
break
;
18
}
19
}
20
}
21
22
f
(
0
,
6
);