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

fpp inside a module

Naomi_Greenberg
ビギナー
1,029件の閲覧回数
I have a variable inside a fortran module that I would like to define based on a defined variable:

module xyz

#if defined BUFSIZE
#define NMWords BUFSIZE
#else
#define NMWords 20
#endif

integer :: NMW = NMWords

end module xyz

Is this legal? In the makefile for this module, I have defined BUFSIZE. When I run this code, NMWords always is 20, even though BUFSIZE should be defined. Any help appreciated!

Never mind. I found the problem. This is legal.
0 件の賞賛
1 返信
Steven_L_Intel1
従業員
1,029件の閲覧回数
Glad to hear you figured it out.
返信