- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can I get the name of the current function? Is there something similar as __func__?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Define what you mean by 'current'; define what you mean by 'function'.
Then things chould be clearer to us.
Then things chould be clearer to us.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok, let me be more specific:
-------------------------------------
program main
call sub1()
stop
end program main
subroutine sub1()
print *, 'My name is sub1.'
! here can we get the sub1 through preprocessing but not type it manually?
end subroutine sub1
-------------------------------------
program main
call sub1()
stop
end program main
subroutine sub1()
print *, 'My name is sub1.'
! here can we get the sub1 through preprocessing but not type it manually?
end subroutine sub1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The compiler does not offer what you are looking for.
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