History

added set array capacity; updated examples and tests for arrays

Ge Wang committed 5 years ago

Commit f66b62b1 parent d4140c110 files · +41 −20Browse files

Showing the changes to examples/array (3 of 10 files). Show all

Unified · Split

3 files
  1. examples/array/array_argument.ck +1 −1
  2. examples/array/array_assign.ck +1 −1
  3. examples/array/array_mdim.ck +3 −2
examples/array/array_argument.ck+1−1
@@ -1,4 +1,4 @@
1// array pass by reference test - should change values?1// array pass by reference test
2 2
3// function that takes array3// function that takes array
4fun void mirror( int arg[] )4fun void mirror( int arg[] )
examples/array/array_assign.ck+1−1
@@ -1,4 +1,4 @@
1// 17.ck : partial array1// partial array (17.ck)
2 2
3// declare int array 2x23// declare int array 2x2
4int x[2][2];4int x[2][2];
examples/array/array_mdim.ck+3−2
@@ -1,4 +1,4 @@
1// 15.ck : multi-dimensional array instantiation1// multi-dimensional array instantiation (15.ck)
2 2
3// delcare int array 2x2x23// delcare int array 2x2x2
4int a[2][2][2];4int a[2][2][2];
@@ -11,4 +11,5 @@ float b[2][2][2]; · 6 unmodified lines
11[ [1,2], [3,4] ] @=> int c[][];11[ [1,2], [3,4] ] @=> int c[][];
12 12
13// test13// test
14if( a[1][1][1] == 5 && b[1][1][1] == 5.0 && c[0][1] == 2 ) <<<"success">>>;14if( a[1][1][1] == 5 && b[1][1][1] == 5.0 && c[0][1] == 2 )
15 <<<"success">>>;

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