Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

pre-processor problem

tf81
Beginner
457 Views





Hi,When I compiled the following source programs using Intel fortran compiler (v8.1) , get the error messages,"fortcom : warning :./hyd : Bad # processor line".


--main program(test.f)--
program test
include 'hyd'
write(*,*)i,j
stop
end
-------------------------




----include file of text form (hyd)--------

integer i,j

#ifdef EOS

parameter (i=3,j=11)

#endif

#ifdef EOS1

parameter (i=10,j=10)

#endif

--------------------------------

If I compile by ifort -O3 -fpp -DEOS test.f, must get i=3,j=11.But I don't get ,and error message.

Why? Please help me.


Message Edited by tf81 on 09-20-2004 04:02 AM

0 Kudos
2 Replies
Steven_L_Intel1
Employee
457 Views
If you are going to use cpp-style preprocessor directives, then you also need to use #include rather than Fortran include.
0 Kudos
tf81
Beginner
457 Views
"Thank you"
It solved.
0 Kudos
Reply