source: doc/theses/mike_brooks_MMath/programs/bkgd-cfa-arrayinteract.cfa @ 76425bc

Last change on this file since 76425bc was 5546f50b, checked in by Peter A. Buhr <pabuhr@…>, 9 months ago

more switch to tabs

  • Property mode set to 100644
File size: 601 bytes
Line 
1// #include <time.h>
2//#include <stdlib.hfa>
3
4struct tm { int x; };
5forall (T*) T* alloc();
6
7int main () {
8    // // // C, library
9    // // void * malloc( size_t );
10    // // C, user
11    // struct tm * el1 = (struct tm * ) malloc(      sizeof(struct tm) );
12    // struct tm * ar1 = (struct tm * ) malloc( 10 * sizeof(struct tm) );
13
14    // // // CFA, library
15    // // forall( T * ) T * alloc();
16    // // CFA, user
17    // tm * el2 = alloc();
18    // tm (*ar2)[10] = alloc();
19
20
21
22
23    // ar1[5];
24    // (*ar2)[5];
25
26
27
28    // tm (&ar3)[10] = *alloc();
29    tm (&ar3)[10];
30    &ar3 = alloc();
31    ar3[5];
32}
Note: See TracBrowser for help on using the repository browser.