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

FPP Preprocessor

ingo_berg
Beginner
714 Views
I'd like to use an assert macro implemented via the fpp preprocessor. In order to do so I'd like to know if there are preprocessor definitions for the current line and the current function available (like in C/C++).

Currently I use something like this (which is working properly):

#ifndef UT_MACRO_H
#define UT_MACRO_H

#define _DEBUG

#ifdef _DEBUG
#define ASSERT(x) call lgAbortIf(.not. (x), "DEBUG ASSERTION: "//#x)
#else
#define ASSERT(X)
#endif

#endif
0 Kudos
3 Replies
Steven_L_Intel1
Employee
714 Views
No, there aren't.
0 Kudos
Lorri_M_Intel
Employee
714 Views
Okay, usually I don't disagree with Steve, but ... if you are using Intel Fortran, the answer is "Yes", the preprocessor supports __FILE__, __DATE__, __TIME__ and __LINE__.
- Lorri
0 Kudos
Steven_L_Intel1
Employee
714 Views
Sure, you disagree with me all the time, esxpecially when I'm wrong. I had forgotten that the Intel version of fpp did support these.

Steve
0 Kudos
Reply