Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

FPP Preprocessor

ingo_berg
Beginner
736 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
736 Views
No, there aren't.
0 Kudos
Lorri_M_Intel
Employee
736 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
736 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