- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After scanning the help literature for several hours, I cannot figure out how to get the pre-processor to work on the source file, for commands such as
#define SIZE 500
#ifdef
etc. I wish to use these constants for array sizing, or math constants, for example.
With Fortran projects on UNIX platforms, these are usually scanned and invoked automatically, but there seems to be a special trick needed here. Can you help elucidate, or point me to the index
page? The search didn't find it for me.
#define SIZE 500
#ifdef
etc. I wish to use these constants for array sizing, or math constants, for example.
With Fortran projects on UNIX platforms, these are usually scanned and invoked automatically, but there seems to be a special trick needed here. Can you help elucidate, or point me to the index
page? The search didn't find it for me.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are a couple of issues here. First, you can get Visual Fortran to invoke the preprocessor by specifying the "Use FPP" option under Project..Settings..Fortran..Preprocessor - or /fpp on the command line. I am puzzled that you could not find it in the documentation - there is an index entry for Preprocessor - Fortran.
Second - by default, the Fortran preprocessor does not do macro expansion, which is what you want. So you'll have to specify /fpp:"/m" - if you are using Developer Studio, you add this under Project Options manually.
Third - the proper Fortran way of doing this is with PARAMETER constants, in which case you would not need to use a preprocessor at all.
Steve
Second - by default, the Fortran preprocessor does not do macro expansion, which is what you want. So you'll have to specify /fpp:"/m" - if you are using Developer Studio, you add this under Project Options manually.
Third - the proper Fortran way of doing this is with PARAMETER constants, in which case you would not need to use a preprocessor at all.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One of the first things I tried was a search on "preprocessor" but that gives 15 topics, none of which have to do with Fortran. They all point to "SDK" as far as I can tell.
Then I tried a boolean search with "fortran AND preprocessor" which gives no results. I noticed that the CD-rom starts up when I search. Are all the help files supposed to be on that, or are they also on hard disk along with the DFDEV executable?
Finally, when I click on "INDEX" DFDEV always crashes.
I really did make an honest attempt to get my question answered before posting. Your comments were helpful.
The bottom line is, the HELP files aren't very well set up, which causes an increased burden on your staff.
Then I tried a boolean search with "fortran AND preprocessor" which gives no results. I noticed that the CD-rom starts up when I search. Are all the help files supposed to be on that, or are they also on hard disk along with the DFDEV executable?
Finally, when I click on "INDEX" DFDEV always crashes.
I really did make an honest attempt to get my question answered before posting. Your comments were helpful.
The bottom line is, the HELP files aren't very well set up, which causes an increased burden on your staff.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is what I get when DFDEV crashes, when I try to use INDEX in the HELP files. Sometimes the system locks up so badly I have to power off because I can not shut down Windows.
=====================================================
DFDEV caused an invalid page fault in
module ITSS.DLL at 017f:5d487227.
Registers:
EAX=00000000 CS=017f EIP=5d487227 EFLGS=00010202
EBX=00000000 SS=0187 ESP=01b7ef94 EBP=01b7f1d0
ECX=01b7efa8 DS=0187 ESI=0048192c FS=0e07
EDX=01b7efc8 ES=0187 EDI=00000000 GS=0000
Bytes at CS:EIP:
8b 07 ff 50 14 8b d8 85 db 0f 85 96 00 00 00 39
Stack dump:
00000000 01b7efa8 00000000 004819ac 0048192c 01b7efc4 5d489eb4 5d4892ef 00481908 0048657c bff7b9c5 81635548 00000014 003a003a 00610044 00610074
=====================================================
DFDEV caused an invalid page fault in
module ITSS.DLL at 017f:5d487227.
Registers:
EAX=00000000 CS=017f EIP=5d487227 EFLGS=00010202
EBX=00000000 SS=0187 ESP=01b7ef94 EBP=01b7f1d0
ECX=01b7efa8 DS=0187 ESI=0048192c FS=0e07
EDX=01b7efc8 ES=0187 EDI=00000000 GS=0000
Bytes at CS:EIP:
8b 07 ff 50 14 8b d8 85 db 0f 85 96 00 00 00 39
Stack dump:
00000000 01b7efa8 00000000 004819ac 0048192c 01b7efc4 5d489eb4 5d4892ef 00481908 0048657c bff7b9c5 81635548 00000014 003a003a 00610044 00610074
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please try the Index, rather than Search. It's usually much more direct.
I don't know why the help is crashing - If you'd like assistance with that, please write to vf-support@compaq.com
Steve
I don't know why the help is crashing - If you'd like assistance with that, please write to vf-support@compaq.com
Steve

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