| 12345678910111213141516171819202122232425262728293031323334353637 |
- extern void printInt(int val);
- extern void printSpaces(int num);
- extern void printNewlines(int num);
- /*void foo(int a, int b, int c) {
- int d;
- printInt(a);
- printInt(b);
- printInt(c);
- printInt(d);
- }
- void bar() {
- foo(1, 2, 3);
- }*/
- void foo(int[a, b] p) {
- int l;
- int[2,3] q;
- l = a;
- printInt(l);
- printSpaces(1);
- l = b;
- printInt(l);
- printSpaces(1);
- //q = p; // should give an error
- // only possible without dimension reduction
- printInt(p[1, 0]); // 10
- printSpaces(1);
- printNewlines(1);
- }
- export int main() {
- int i = 1;
- int[4, i] arr;
- arr[1, 0] = 10;
- foo(arr);
- return 0;
- }
|