- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After getting used to upper and lowercase equivalence, it took a bit to realize #define <macro> <value> was case sensitive in use as in:
do i=1, MACRO
does not work.
If right, it would have been a nice addition to fpp docs.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FPP is not Fortran, you could, if you wish, use CPP to preprocess the file.
I find it helpful to make use of case sensitivity to correct bugs in the compiler/runtime library.
Assume there is a flaky RTL function (or a function currently not suitable), call it FOOBAR, which in Fortran you can use foobar (case insensitive). When I have found issues with a library function and wish to make a correction, I may choose to use fOoBaR in the source code and then by using FPP and #define or not having a #define, or not using FPP, the same code will compile and selectively choose the desired function. This done without having to insert !DIR$ IF .... conditional code, and then later going back to remove the ugliness from the code.
Make lemonade.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It just took me what seemed like a long time to figure out what was wrong with my first use of the ifort fpp with a simple #define IXSIZE (16)" to use in an array length and a do loop.
That is an interesting use of the fpp. Thanks.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page