×
Namespaces

Variants
Actions

Archived:Getting the name of the current function in Symbian C++

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.


Article Metadata
Tested with
Devices(s): All (S60)
Compatibility
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Article
Keywords: RDebug, __func__
Created: User:Technical writer 2 (June 25, 2007, updated December 17, 2008)
Last edited: hamishwillee (29 Jun 2012)


The name of the current function can be retrieved for logging purposes in debug builds with the __func__ predefined identifier:

  void LogFunctionName(const char* name)
{
RDebug::Printf("current function: %s\n", name);
}

Now the function name can be printed as follows:

  LogFunctionName(__func__);

See also

Simple-to-use Symbian C++ macros for writing debug log files

This page was last modified on 29 June 2012, at 05:03.
39 page views in the last 30 days.
×