[PLUG] OT: Function name macro in ANSI C ?
Fedor Pikus
fedorp at wv.mentorg.com
Fri Jul 11 09:26:02 UTC 2003
On Fri, 11 Jul 2003, Tyler Creelan wrote:
> I know most C preprocessors have a __LINE__ macro for the line number,
> is there a similar macro for the name of the current function?
No, because preprocessor does not know what a "function" is.
> Ie, something like:
>
> printf("%s is the current function. ",__FUNCTION__);
>
> ?
>
> -TFC
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
--
Fedor G. Pikus
Mentor Graphics Corporation | Phone: (503) 685-4857
8405 SW Boeckman Road | FAX: (503) 685-1239
Wilsonville, Oregon 97070 | http://www.pikus.net/~pikus/
More information about the PLUG
mailing list