Re: #define in an "include file"
- From: tim prince <timothyprince@xxxxxxxxxxxxx>
- Date: Wed, 14 Nov 2007 11:32:21 -0800
sarvin.moghaddam@xxxxxxxxx wrote:
Dear All,As these are pre-processor defines, you must set the project up to invoke pre-processing (command line option /Qfpp). Among the most frequently given bits of advice on this list are better ways to do these. It might make more sense to declare those constants with PARAMETER.
I am trying to compile my code using "Compaq Visual Fortran" which
includes some *.for and some *.inc files. In one of the *.inc files
(define.inc) I have:
# define INT2 integer*2
# define REAL real*8
# define EXP dexp
# define SQRT dsqrt
# define ZERO 0.0d0
# define HALF 0.5d0
# define ONE 1.0d0
And obviously I include the define.inc file in the main and all the
subroutine as:
#include "define.inc"
but for some ? reason when I compile the code using the "Rebuild All"
option under Build toolbar, I get warnings such as:
Warning: Variable ONE is used before its value has been defined
if (csp.gt. ONE) csp= ONE
.
- Follow-Ups:
- Re: #define in an "include file"
- From: tim prince
- Re: #define in an "include file"
- References:
- #define in an "include file"
- From: sarvin . moghaddam
- #define in an "include file"
- Prev by Date: Re: speed up calculation suggestions
- Next by Date: Re: association of pointers
- Previous by thread: Re: #define in an "include file"
- Next by thread: Re: #define in an "include file"
- Index(es):
Relevant Pages
|