Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29274 Discussions

inserting macro arguments into strings

gormo
Beginner
497 Views
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.
0 Kudos
0 Replies
Reply