source: tests/tuplearray.cfa @ ea10f64

Last change on this file since ea10f64 was ea10f64, checked in by Peter A. Buhr <pabuhr@…>, 10 hours ago

first attempt at tests for tuple arrays

  • Property mode set to 100644
File size: 758 bytes
Line 
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] foo( size_t size, [size] [int,int] f ) {
23[void] foo( size_t size, [10] [int,int] f ) {
24        for ( i; size ) f[i] = [1, 2];
25}
26
27int main() {
28        [10] [int,int] arr;
29//      [int,int] arr[10];      // unimplemented
30
31        foo( 10, arr );
32        for ( i; 10 ) sout | arr[i];
33}
Note: See TracBrowser for help on using the repository browser.