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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
846
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 int printf(const char *,...);
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 char c[] = {0,1,2,3,4,5,6,7,8,9};
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 short s[] = {0,1,2,3,4,5,6,7,8,9};
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 int j[] = {0,1,2,3,4,5,6,7,8,9};
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 long long l[] = {0,1,2,3,4,5,6,7,8,9};
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 void
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 f(char *c,short *s, int *j, long long *l)
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 {
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 int i;
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
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
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 }
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
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
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 }
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
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
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 }
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
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
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
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
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 }
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 void
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 st(char *c,short *s, int *j, long long *l)
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 {
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 int i;
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 for( i = 0;i<10;i++) {
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 849
diff changeset
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
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 }
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 for( i = 0;i<10;i++) {
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 849
diff changeset
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
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 }
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 for( i = 0;i<10;i++) {
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 849
diff changeset
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
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 }
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 for( i = 0;i<10;i++) {
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 849
diff changeset
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
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 }
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 }
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 int
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 main()
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 {
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 f(c,s,j,l);
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 st(c,s,j,l);
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 f(c,s,j,l);
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 }
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56
ab4af28a1fa1 add cloop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 /* end */