- Timestamp:
- Mar 6, 2024, 11:15:34 AM (9 months ago)
- Branches:
- master
- Children:
- 1df26c3
- Parents:
- 7e13b11
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/functions.cfa
r7e13b11 r56b47b9 10 10 // Created On : Wed Aug 17 08:39:58 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:54:09 201813 // Update Count : 1312 // Last Modified On : Tue Mar 5 11:02:25 2024 13 // Update Count : 34 14 14 // 15 15 16 16 // ANSI function definitions 17 17 18 void h( void) {}18 void h( void ) {} 19 19 20 20 int f ( 21 int ( void),22 int ( int),23 int (( void)),24 int (( int)),25 void g( void)26 27 (* 21 int ( void ), 22 int ( int ), 23 int (( void )), 24 int (( int )), 25 void g( void ) 26 ) { 27 (*g)(); 28 28 g(); 29 29 g = h; … … 32 32 int f1() {} 33 33 int (f2()) {} 34 int (* 34 int (*f3())() {} 35 35 int * ((f4())) {} 36 int ((* 36 int ((*f5()))() {} 37 37 int * f6() {} 38 int * ( f7)() {}38 int * ( f7)() {} 39 39 int ** f8() {} 40 int * const * ( f9)() {}40 int * const * ( f9)() {} 41 41 int (* f10())[] {} 42 42 int (* f11())[][3] {} … … 66 66 // Cforall extensions 67 67 68 // [] f( ); 69 [int] f( ); 70 // [] f(int); 71 [int] f(int); 72 // [] f( ) {} 73 [int] f( ) {} 74 // [] f(int) {} 75 [int] f(int) {} 76 77 [int x] f( ); 78 // [] f(int x); 79 //[int x] f(int x); 80 //[int x] f( ) {} 81 // [] f(int x) {} 82 //[int x] f(int x) {} 83 84 [int, int x] f( ); 85 // [] f(int, int x); 86 [int, int x] f(int, int x); 87 [int, int x] f( ) {} 88 // [] f(int, int x) {} 89 [int, int x] f(int, int x) {} 90 91 [int, int x, int] f( ); 92 // [] f(int, int x, int); 93 [int, int x, int] f(int, int x, int); 94 [int, int x, int] f( ) {} 95 // [] f(int, int x, int) {} 96 [int, int x, int] f(int, int x, int) {} 97 98 [int, int x, * int y] f( ); 99 // [] f(int, int x, * int y); 100 [int, int x, * int y] f(int, int x, * int y); 101 [int, int x, * int y] f( ) {} 102 // [] f(int, int x, * int y) {} 103 [int, int x, * int y] f(int, int x, * int y) {} 68 [] f(); 69 [void] f(); 70 [int] f(); 71 [] f( int ); 72 [void] f( int ); 73 [int] f( int ); 74 [] f() {} 75 [void] fv() {} 76 [int] f() {} 77 [] f( int ) {} 78 [void] fv( int ) {} 79 [int] f( int ) {} 80 81 [int x] f(); 82 [] f( int x ); 83 [void] fv( int x ); 84 //[int x] f( int x ); 85 //[int x] f() {} 86 [] f2( int x ) {} 87 [void] fv1( int x ) {} 88 //[int x] f( int x ) {} 89 90 [int, int x] f(); 91 [] f( int, int x ); 92 [void] fv( int, int x ); 93 [int, int x] f( int, int x ); 94 [int, int x] f() {} 95 [] f( int, int x ) {} 96 [void] fv( int, int x ) {} 97 [int, int x] f( int, int x ) {} 98 99 [int, int x, int] f(); 100 [] f( int, int x, int ); 101 [void] fv( int, int x, int ); 102 [int, int x, int] f( int, int x, int ); 103 [int, int x, int] f() {} 104 [] f( int, int x, int ) {} 105 [void] fv( int, int x, int ) {} 106 [int, int x, int] f( int, int x, int ) {} 107 108 [int, int x, * int y] f(); 109 [] f( int, int x, * int y ); 110 [void] fv( int, int x, * int y ); 111 [int, int x, * int y] f( int, int x, * int y ); 112 [int, int x, * int y] f() {} 113 [] f( int, int x, * int y ) {} 114 [void] fv( int, int x, * int y ) {} 115 [int, int x, * int y] f( int, int x, * int y ) {} 104 116 105 117 // function prototypes … … 116 128 int ( int, int p ), 117 129 [int](int) 118 119 int (* (* pc )[][10])[][3];130 ) { 131 int (* (* pc )[][10])[][3]; 120 132 * [][10] * [][3] int p; 121 * [] * [int]( int) p;133 * [] * [int]( int ) p; 122 134 } 123 135 … … 149 161 int * const * const ([]), 150 162 int * const * const ([10]) 151 163 ); 152 164 153 165 int f( … … 170 182 int * const * const ([]), 171 183 int * const * const ([10]) 172 ) { 173 } 184 ) {} 174 185 175 186 typedef int T; 176 187 177 int f( T ( * f), T t ) {178 T ( T);188 int f( T ( *f ), T t ) { 189 T ( T ); 179 190 } 180 191
Note: See TracChangeset
for help on using the changeset viewer.