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/array/array_mmixed.ck (1 of 486 files). Show all

Unified · Split

examples/array/array_mmixed.ck+17−0
@@ -0,0 +1,17 @@
1// based on Robin Haberkorn's example
2int a[0][2];
3
4// instantiate arrays
5new int[2] @=> a["foo"];
6new int[2] @=> a["bar"];
7
8// fill them
923 => a["foo"][0];
1024 => a["foo"][1];
1132 => a["bar"][0];
1242 => a["bar"][1];
13
14// test them
15if( a["foo"][0] == 23 && a["bar"][1] == 42 )
16 <<< "success" >>>;
17

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