C Style Preprocessor

C Style Preprocessor

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.

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

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

Jugoslav
www.xeffort.com

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

Leave a Comment

Please sign in to add a comment. Not a member? Join today