History

moving examples to top dir

Ge Wang committed 9 years ago

Commit 35ca2f61 parent fd011ef486 files · +-44 −-44Browse files

Showing the changes to examples/ctrl/ctrl_continue.ck (1 of 486 files). Show all

Unified · Split

examples/ctrl/ctrl_continue.ck+27−0
@@ -0,0 +1,27 @@
1// continue in nested block
2
30 => int j;
40 => int i;
50 => int check;
6
7// loop
8while ( j < 5 )
9{
10 0 => i;
11 while ( i < 5 )
12 {
13 1 +=> i;
14 if ( j < 4 ) continue;
15
16 // because of continue, this only happens in last ( j==0 )
17 2 +=> check;
18 }
19
20 // if continue malfunctions, this is skipped, and we get INFINITE LOOP
21 1 +=> j;
22}
23
24// make sure that continue does the right thing in the inner loop?
25if ( check == 10 ) <<<"success">>>;
26
27

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t