Mercurial > hg > CbC > old > device
annotate test/cloop.c @ 927:b491db049d74
Added tag current-release for changeset 4e73a22327a8
author | kono |
---|---|
date | Sun, 13 Apr 2014 10:20:02 +0900 |
parents | d712ee10feb7 |
children |
rev | line source |
---|---|
846 | 1 int printf(const char *,...); |
2 | |
3 char c[] = {0,1,2,3,4,5,6,7,8,9}; | |
4 short s[] = {0,1,2,3,4,5,6,7,8,9}; | |
5 int j[] = {0,1,2,3,4,5,6,7,8,9}; | |
6 long long l[] = {0,1,2,3,4,5,6,7,8,9}; | |
7 | |
8 void | |
9 f(char *c,short *s, int *j, long long *l) | |
10 { | |
11 int i; | |
12 for( i = 0;i<10;i++) { | |
896
d712ee10feb7
local_nptr for locally defined struct
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
880
diff
changeset
|
13 printf("#0012:%d ",c[i]); |
846 | 14 } |
15 for( i = 0;i<10;i++) { | |
896
d712ee10feb7
local_nptr for locally defined struct
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
880
diff
changeset
|
16 printf("#0015:%d ",s[i]); |
846 | 17 } |
18 for( i = 0;i<10;i++) { | |
896
d712ee10feb7
local_nptr for locally defined struct
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
880
diff
changeset
|
19 printf("#0018:%d ",j[i]); |
846 | 20 } |
21 for( i = 0;i<10;i++) { | |
896
d712ee10feb7
local_nptr for locally defined struct
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
880
diff
changeset
|
22 printf("#0021:%lld ",l[i]); |
846 | 23 } |
896
d712ee10feb7
local_nptr for locally defined struct
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
880
diff
changeset
|
24 printf("#0023:\n"); |
846 | 25 } |
26 | |
27 void | |
28 st(char *c,short *s, int *j, long long *l) | |
29 { | |
30 int i; | |
31 for( i = 0;i<10;i++) { | |
880 | 32 c[i] = i; |
896
d712ee10feb7
local_nptr for locally defined struct
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
880
diff
changeset
|
33 printf("#0032:\n"); |
846 | 34 } |
35 for( i = 0;i<10;i++) { | |
880 | 36 s[i] = i; |
896
d712ee10feb7
local_nptr for locally defined struct
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
880
diff
changeset
|
37 printf("#0036:\n"); |
846 | 38 } |
39 for( i = 0;i<10;i++) { | |
880 | 40 j[i] = i; |
896
d712ee10feb7
local_nptr for locally defined struct
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
880
diff
changeset
|
41 printf("#0040:\n"); |
846 | 42 } |
43 for( i = 0;i<10;i++) { | |
880 | 44 l[i] = i; |
896
d712ee10feb7
local_nptr for locally defined struct
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
880
diff
changeset
|
45 printf("#0044:\n"); |
846 | 46 } |
47 } | |
48 | |
49 int | |
50 main() | |
51 { | |
52 f(c,s,j,l); | |
53 st(c,s,j,l); | |
54 f(c,s,j,l); | |
55 } | |
56 | |
57 /* end */ |