Quote:
Originally Posted by Dragokas
MAGNAT2645, interesting ability, but IMHO, useless sample =) Can't find where it could be useful. The same can be written by manual string enquoting.
|
As i said, it's not that useful. You can use it in a macro to join text (and put it without quotes).
Code:
#define ERROR(%0) PrintToServer( "ERROR: " ... #%0 )
int a = 5;
int b = 0;
int c;
if ( b == 0 ) ERROR(Division by zero!);
else c = a / b;
But, it's better to use quotes for better readability
Code:
#define ERROR(%0) PrintToServer( "ERROR: " ... %0 )
if ( b == 0 ) ERROR( "Division by zero!" );
__________________