Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MACRO: are there macros, that store function-names etc.?

Status
Not open for further replies.

AMosmann

Programmer
May 27, 2003
82
DE
I want to test a big block of functions.
For that I decided to write a MACRO called XTRACE,
that will show a string (like TRACE).
The problem in TRACE is, that it only will show 200 lines.

this XTRACE should show the time when it is called, the Function from where it is called, a string

and all that I will write in a stream.

1st problem: Is there a standard-macro that stores the Name of a function (are there any functions that store a status of precompiler)
2nd problem: to write into a stream needs to open, write, close every time. does anyone know a better way (must work, if the debug is broken before end)

Thanx
:)(-::)


Greetings Andreas
 
These macros are valuable when logging / tracing :
__FILE__ and __LINE__ (Return char* and integer)

If you have a .net compiler i think this is available also :
__FUNCTION__

/JOlesen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top