1 | #include <fstream.hfa> |
---|
2 | |
---|
3 | [void] bar1( size_t size, [10] [int,int] f ) { |
---|
4 | for ( i; size ) f[i] = [1, 2]; |
---|
5 | } |
---|
6 | [void] bar2( * [int,int] f ); |
---|
7 | |
---|
8 | [void] bar3( [][10] [int,int] f ); |
---|
9 | [void] bar4( [const *] [int,int] f ); |
---|
10 | [void] bar5( [const 3] [int,int] f ); |
---|
11 | //[void] bar6( [static 3] [int,int] f ); |
---|
12 | [void] bar7( [3] [int,int] f ); |
---|
13 | |
---|
14 | [void] bar8( [3][10] [int,int] f ); |
---|
15 | [void] bar9( [3]* [int,int] f ); |
---|
16 | |
---|
17 | [void] bar10( * [3] [int,int] f ); |
---|
18 | |
---|
19 | [void] bar11( [3][10] [int,int] f ); |
---|
20 | [void] bar12( * [3][10] [int,int] f ); |
---|
21 | |
---|
22 | [void] foo1( [10] [int,int] f ) { |
---|
23 | for ( i; 10 ) f[i] = [1, 2]; |
---|
24 | } |
---|
25 | [void] foo2( size_t size, [size] [int,int] f ) { |
---|
26 | for ( i; size ) f[i] = [2, 4]; |
---|
27 | } |
---|
28 | |
---|
29 | int main() { |
---|
30 | [10] [int,int] arr; |
---|
31 | // [int,int] arr[10]; // unimplemented |
---|
32 | |
---|
33 | foo1( arr ); |
---|
34 | for ( i; 10 ) sout | arr[i]; |
---|
35 | |
---|
36 | foo2( 10, arr ); |
---|
37 | for ( i; 10 ) sout | arr[i]; |
---|
38 | } |
---|