PLUTO
test.c
Go to the documentation of this file.
1 #include<stdio.h>
2 
3 #define C_IONS 3
4 #define N_IONS 0
5 
6 
7 #if C_IONS == 0
8  #define C_EXPAND(a,b,c,d,e)
9 #elif C_IONS == 1
10  #define C_EXPAND(a,b,c,d,e) ,a
11 #elif C_IONS == 2
12  #define C_EXPAND(a,b,c,d,e) ,a,b
13 #elif C_IONS == 3
14  #define C_EXPAND(a,b,c,d,e) ,a,b,c
15 #elif C_IONS == 4
16  #define C_EXPAND(a,b,c,d,e) ,a,b,c,d
17 #elif C_IONS == 5
18  #define C_EXPAND(a,b,c,d,e) ,a,b,c,d,e
19 #endif
20 
21 #if N_IONS == 0
22  #define N_EXPAND(a,b,c,d,e)
23 #elif N_IONS == 1
24  #define N_EXPAND(a,b,c,d,e) ,a
25 #elif N_IONS == 2
26  #define N_EXPAND(a,b,c,d,e) ,a,b
27 #elif N_IONS == 3
28  #define N_EXPAND(a,b,c,d,e) ,a,b,c
29 #elif N_IONS == 4
30  #define N_EXPAND(a,b,c,d,e) ,a,b,c,d
31 #elif N_IONS == 5
32  #define N_EXPAND(a,b,c,d,e) ,a,b,c,d,e
33 #endif
34 
35 enum {
36  HI = 10
37  C_EXPAND(CI, CII, CIII, CIV, CV)
38  N_EXPAND(NI, NII, NIII, NIV, NV)
39 };
40 
41 int main()
42 {
43  double coll_ion_P[] = { 0., 0., 1.
44  C_EXPAND(0., 1., 1., 1., 1.)
45  N_EXPAND(0., 0., 1., 1., 0.), 0., 1., 0. };
46  double ab[] = {1 C_EXPAND(0.1,0.2,0.3,0.4, 0.5 ) N_EXPAND(10.2, 10.3, 10.4, 10.5, 10.6)};
47  int a;
48  printf ("CIII = %d, %d\n",CIII, CI);
49 
50  a = (1,0);
51  return (0);
52 
53 }
54 
55 
static double a
Definition: init.c:135
Definition: test.c:36
#define C_EXPAND(a, b, c, d, e)
Definition: test.c:14
#define N_EXPAND(a, b, c, d, e)
Definition: test.c:22
int main()
Definition: test.c:41