"#define LOG printf " to open and close the log message

81 views
Skip to first unread message

杨标(Vinge)

unread,
Apr 22, 2013, 10:11:06 PM4/22/13
to pawnscript
Hi,all:
Is there a way to use the "#define printf" to open and close the log message?
In c ,it canbe do like
#define LOG(...) printf(...)
and if I don't want the log message just change it to
#define LOG(...) //printf(...)

In pawn, I it can be done with
#define LOG printf
but,
#define LOG //printf
will case every line of LOG a warning.

Is there a clean way to do this?

        ven....@gmail.com
          2013-04-23

Alex Cole

unread,
May 3, 2013, 1:06:28 PM5/3/13
to pawns...@googlegroups.com
Try:

#define LOG(%0); printf(%0);

Then commenting out the "printf" part will compile nothing.
Reply all
Reply to author
Forward
0 new messages