3 type: unsigned char, unsigned int, signed int, unsigned long, signed long, unsigned long long, signed long long, float
9 #if !defined( __SDCC_pdk14) && !defined( __SDCC_pdk15) // Lack of memory
10 #if !defined( __SDCC_ds390) // Bug 3307
12 {type
} sum({type
} a
) __reentrant
14 if(a
>1) return a
+sum(a
-1);
18 {type
} fact({type
} a
) __reentrant
20 if(a
>1) return a
*fact(a
-1);
24 {type
} div2n({type
} a
, int n
) __reentrant
26 if(n
>0) return div2n(a
/2,n
-1);
30 {type
} fib({type
} a
) __reentrant
32 if(a
>1) return fib(a
-1)+fib(a
-2);
42 #if !defined( __SDCC_pdk14) && !defined( __SDCC_pdk15) // Lack of memory
43 #if !defined( __SDCC_ds390) // Bug 3307
45 ASSERT(fact(5) == 120);
46 ASSERT(div2n(128, 7) == 1);