Last change
on this file since 7a29392f was
7972603,
checked in by Michael Brooks <mlbrooks@…>, 9 months ago
|
Missing files from last thesis push
|
-
Property mode set to
100644
|
File size:
600 bytes
|
Line | |
---|
1 | // #include <time.h> |
---|
2 | //#include <stdlib.hfa> |
---|
3 | |
---|
4 | struct tm { int x; }; |
---|
5 | forall (T*) T* alloc(); |
---|
6 | |
---|
7 | int 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.