inserting macro arguments into strings

inserting macro arguments into strings

I have been trying to trying to get ifc's fpp to behave the same as gnu cpp and compaq cpp with regards to inserting macro arguments into quotes. eg.
#define DEBUG(ARG) PRINT*, 'ARG -> ', ARG
PROGRAM CPPBUG
REAL R
R = 1.0
DEBUG
END
> f77 bug.F
> ./a.out
R -> 1.000000
however this doesn't work with ifc (unfortunately, stringification with # doesn't seem to work with any fpp). Does anyone know if there is a workaround for this. I'm using ifc 6.0.
Cheers
Gerard.

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.