- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi, i am using ifort with fpp. i have a preprocessor directive of the form:
#define pop%me 1
i would like this to replace occurances of "pop%me" with "1". However, it is replacing "pop" with "%me 1". Can anybody suggest a work around to this problem?
thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
% is not a valid character in identifiers, even in the preprocessor. Try pop_me instead or pop$me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
% is not a valid character in identifiers, even in the preprocessor. Try pop_me instead or pop$me.
thanks for your reply. i was trying to replace derived type conditional statements in some source code with a constant expression, and then letting the optimizer take care of them (removing them gives ~5% performance increase). in my particular usage of this source i know this condition will always be true, but it is not in more general applications. i had hoped that a simple use of the preprocessoer would have allowed me to just maintain a single version of the code, but i'm now guessing this is not possible...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Invert your FPP usage.
#if 0
#define POP_ME pop%me
#else
#define POP_ME 1
#endif
Then use POP_ME in the source code.
Jim Dempsey
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page