source: CIVL/examples/languageFeatures/2dpointerTest.cvl@ 3dbdc037

1.23 2.0 main test-branch
Last change on this file since 3dbdc037 was 361d37a, checked in by Manchun Zheng <zmanchun@…>, 12 years ago

added test for pointer of pointer.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@898 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 408 bytes
RevLine 
[361d37a]1#include <civlc.h>
2
3void Process(){
4 double ** buf;
5 int *p;
6
7 p = (int *)$malloc($here, 2 * sizeof(int));
8 buf = (double **)$malloc($here, 2 * sizeof(double *));
9 for(int i=0; i<2; i++){
10 buf[i] = (double *)$malloc($here,
11 2 * sizeof(double));
12 }
13
14}
15
16void main(){
17 $proc procs[2];
18
19 procs[0] = $spawn Process();
20 procs[1] = $spawn Process();
21
22 $wait(procs[0]);
23 $wait(procs[1]);
24}
Note: See TracBrowser for help on using the repository browser.