annotate run/s/scope_18_C.d @ 1460:d0ab95b04926

[Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop Thomas K?hne <thomas-dloop@kuehne.cn> 2007-01-07 http://d.puremagic.com/issues/show_bug.cgi?id=815
author thomask
date Thu, 05 Apr 2007 10:28:19 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1460
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
1 // $HeadURL$
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
2 // $Date$
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
3 // $Author$
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
4
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
5 // @author@ Thomas Kühne <thomas-dloop@kuehne.cn>
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
6 // @date@ 2007-01-07
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=815
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
8 // @desc@ [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
9
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
10 module dstress.run.s.scope_18_C;
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
11
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
12 int main(){
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
13 int[] log;
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
14 int i = 3;
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
15
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
16 while(i--){
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
17 scope(failure){
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
18 log ~= 0xEE;
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
19 }
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
20 log ~= i;
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
21
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
22 if(i % 2){
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
23 continue;
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
24 }
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
25 log ~= 0xFF;
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
26 }
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
27
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
28 if([2, 0xFF, 1, 0, 0xFF] != log){
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
29 assert(0);
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
30 }
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
31
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
32 return 0;
d0ab95b04926 [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
thomask
parents:
diff changeset
33 }