- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I needs to use macro to redirect formatted write() to a all. It's OK when I put macro directly on the top of my source code. Because these large amount of macro need to be appeared in every file of my project, so I am trying to use comma in my source file to make it simple. Now the problem happens when the source code is complied.
In the source code, I have a sentence:
the contents in zzz.for are like:
There is no problem when the zzz.for is complied independently. But the original source has problem when been compiled.
Can some body provide some ideas?
Thank you in advance.
Jack
In the source code, I have a sentence:
the contents in zzz.for are like:
#define WriteWinNF1(v1) if(nout.eq.nscr) then;WriteWinF1(v1);else;write(nout,*) v1;endif #define WriteWinNF2(v1,v2) if(nout.eq.nscr) then;WriteWinF2(v1,v2);else;write(nout,*) v1,v2;endif #define WriteWinNF3(v1,v2,v3) if(nout.eq.nscr) then;WriteWinF3(v1,v2,v3);else;write(nout,*) v1,v2,v3;endif #define WriteWinNF4(v1,v2,v3,v4) if(nout.eq.nscr) then;WriteWinF4(v1,v2,v3,v4);else;write(nout,*) v1,v2,v3,v4;endif #define WriteWinNF6(v1,v2,v3,v4,v5,v6) if(nout.eq.nscr) then;WriteWinF6(v1,v2,v3,v4,v5,v6);else;write(nout,*) v1,v2,v3,v4,v5,v6;endif
There is no problem when the zzz.for is complied independently. But the original source
Can some body provide some ideas?
Thank you in advance.
Jack
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah. You must use #include, not INCLUDE, for this. You need the macros to be seen by fpp, the preprocessor, and it will process only #include directives.
Steve
Steve

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page