annotate test/simp.c @ 0:d35df41eac69

Initial revision
author kono
date Thu, 13 Jan 2000 02:41:41 +0900
parents
children 096559f07a70
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
1 #include "stdio.h"
d35df41eac69 Initial revision
kono
parents:
diff changeset
2
d35df41eac69 Initial revision
kono
parents:
diff changeset
3 alpha(c)
d35df41eac69 Initial revision
kono
parents:
diff changeset
4 char c;
d35df41eac69 Initial revision
kono
parents:
diff changeset
5 {
d35df41eac69 Initial revision
kono
parents:
diff changeset
6 return(('a'<=c&&c<='z')||('A'<=c&&c<='Z')||c=='_');
d35df41eac69 Initial revision
kono
parents:
diff changeset
7 }
d35df41eac69 Initial revision
kono
parents:
diff changeset
8 char ch;
d35df41eac69 Initial revision
kono
parents:
diff changeset
9
d35df41eac69 Initial revision
kono
parents:
diff changeset
10 main(int ac,char *av[])
d35df41eac69 Initial revision
kono
parents:
diff changeset
11 {
d35df41eac69 Initial revision
kono
parents:
diff changeset
12 int i;
d35df41eac69 Initial revision
kono
parents:
diff changeset
13 printf("%d\n",ac);
d35df41eac69 Initial revision
kono
parents:
diff changeset
14 for(i=0;i<ac;i++) {
d35df41eac69 Initial revision
kono
parents:
diff changeset
15 printf("%s\n",av[i]);
d35df41eac69 Initial revision
kono
parents:
diff changeset
16 }
d35df41eac69 Initial revision
kono
parents:
diff changeset
17 ch = 'E';
d35df41eac69 Initial revision
kono
parents:
diff changeset
18 main0(ac,ch,av);
d35df41eac69 Initial revision
kono
parents:
diff changeset
19 }
d35df41eac69 Initial revision
kono
parents:
diff changeset
20
d35df41eac69 Initial revision
kono
parents:
diff changeset
21 main0(ac,ch,av)
d35df41eac69 Initial revision
kono
parents:
diff changeset
22 int ac;
d35df41eac69 Initial revision
kono
parents:
diff changeset
23 char ch;
d35df41eac69 Initial revision
kono
parents:
diff changeset
24 char *av[];
d35df41eac69 Initial revision
kono
parents:
diff changeset
25 {
d35df41eac69 Initial revision
kono
parents:
diff changeset
26 int i;
d35df41eac69 Initial revision
kono
parents:
diff changeset
27 printf("%d %c\n",ac,ch);
d35df41eac69 Initial revision
kono
parents:
diff changeset
28 for(i=0;i<ac;i++) {
d35df41eac69 Initial revision
kono
parents:
diff changeset
29 printf("%s\n",av[i]);
d35df41eac69 Initial revision
kono
parents:
diff changeset
30 }
d35df41eac69 Initial revision
kono
parents:
diff changeset
31 printf("%d==1\n",alpha(ch));
d35df41eac69 Initial revision
kono
parents:
diff changeset
32 }
d35df41eac69 Initial revision
kono
parents:
diff changeset
33