C's Limited Macro Capabilities
Edwin R. Carp
erc at khijol.UUCP
Tue Dec 5 15:27:11 AEST 1989
In article <69517 at psuecl.bitnet> bpm at psuecl.bitnet (Brian Moquin) writes:
> #define cast(flag,x) #if flag=='I' \
> ((int)(x)) \
> #elif flag=='F' \
> ((float)(x)) \
> #endif
Couldn't you do the same thing with:
#if flag=='I'
#define cast(flag,x) ((int)(x))
#elif flag=='F'
#define cast(flag,x) ((flaot)(x))
#endif
----------------------------------- cut here -----------------------------------
Ed Carp N7EKG/5 (28.3-28.5) erc at puzzle!khijol
Austin, Tx; (home) (512) 445-2044
Snail Mail: 1800 E. Stassney #1205
Austin, Tx 78744
More information about the Comp.lang.c
mailing list