Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (24 sloc) 629 Bytes
# C Pre-processor
#include <filename.h>
#include "filename.h"
#if
#else
#elif
#endif
#define NAME text
#define NAME(var) text
#undef NAME
#define EVAL(E) printf("%s = %d\n", #E, E);
#define ARRAY_METHOD(N) Array *Array_##N
#if defined(NAME) && defined(FOO)
\ line continuation
# Macro Examples
#define MAX(A, B) ((A) > (B) ? (A) : (B))
MAX(20, 15);
#define ERROR(S, ...) fprintf(stderr, S "\n", __VA_ARGS__)
ERROR("SyntaxError: near `%s'", str);
# Predefined Names
__LINE__ // => 128
__FILE__ // => "foo.c"
__DATE__ // => "Oct 30 2009"
__TIME__ // => "10:01:29"