- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does intel fortran support __FUNCTION__ to get function or subroutine name?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thecodeasfollowing,
-----1.f------------
programmain
print*,__FILE__,__FUNCTION__
endprogram
----------------------
programmain
print*,__FILE__,__FUNCTION__
endprogram
----------------------
Iexpectthatitwilloutput"1.fmain".
Any help will be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
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