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

Support __FUNCTION__?

GHui
Novice
647 Views
Does intel fortran support __FUNCTION__ to get function or subroutine name?
0 Kudos
3 Replies
GHui
Novice
647 Views
Thecodeasfollowing,
-----1.f------------
programmain
print*,__FILE__,__FUNCTION__
endprogram
----------------------
Iexpectthatitwilloutput"1.fmain".
Any help will be appreciated.
0 Kudos
Georg_Z_Intel
Employee
647 Views
Hello,

from top of my head, no. The only supported directives for FPP are:

Directive Result
__FILE__ replace this string with the input file name (a character string literal)
__LINE__ replace this string with the current line number in the input file (an integer constant)
__DATE__ replace this string with the date that fpp processed the input file (a character string literal in the form Mmm dd yyyy)
__TIME__ replace this string with the time that fpp processed the input file (a character string literal in the form hh:mm:ss)

Usually providing both file name & line number should be sufficient to identify a source location.

Best regards,

Georg Zitzlsberger
0 Kudos
TimP
Honored Contributor III
647 Views
This was only today filed as a feature request for gfortran
If it were supported in the pre-processor for another Fortran, such a pre-processor could be used. fpp tends to avoid extensions beyond widespread practice.
0 Kudos
Reply