- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I'm glad to find this site.
I counld'n find a solution for days.
I really hope you can give me a solution.
I want to use C Style Preprocessor.
Cause as I know VF 6.6B can support that.
I make a Header file.
That file constists like these.
#define a 100
#define b 200
So I inlude that header file.
#include "header.h"
But when I compiled it, I saw # bad processor warning.
And then I can't complete compile.
In documention, use /fpp option.
But I can't exactly know how to do it.
Please tell me.. I need your help...
thank you.
I'm glad to find this site.
I counld'n find a solution for days.
I really hope you can give me a solution.
I want to use C Style Preprocessor.
Cause as I know VF 6.6B can support that.
I make a Header file.
That file constists like these.
#define a 100
#define b 200
So I inlude that header file.
#include "header.h"
But when I compiled it, I saw # bad processor warning.
And then I can't complete compile.
In documention, use /fpp option.
But I can't exactly know how to do it.
Please tell me.. I need your help...
thank you.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See this recent thread.
If all that header #defines are constants, I'f recommend using standard Fortran PARAMETER attribute instead of #define (and possibly INCLUDE statement (not #include)). If you really need macros with arguments, only then IMO #define has its merits.
Jugoslav
If all that header #defines are constants, I'f recommend using standard Fortran PARAMETER attribute instead of #define (and possibly INCLUDE statement (not #include)). If you really need macros with arguments, only then IMO #define has its merits.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By default, the Fortran preprocessor doesn't do macro substitution.
It's a little klunky to override that default, but still pretty easy.
If you are using the command line, df /fpp:"/m"
or, if you are using Developer Studio, go to Project-
Settings-Fortran, then in the Project Options box in the lower right corner, modify the /fpp to /fpp:"/m"
- Lorri
It's a little klunky to override that default, but still pretty easy.
If you are using the command line, df /fpp:"/m"
or, if you are using Developer Studio, go to Project-
Settings-Fortran, then in the Project Options box in the lower right corner, modify the /fpp to /fpp:"/m"
- Lorri
![](/skins/images/BC9A7A3465121B56B278007F4EE8899F/responsive_peak/images/icon_anonymous_message.png)
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