A
Army1987
Is there a way to #define a sequence of several identifiers into something
else?
For example, suppose I write:
#include <limits.h>
#ifndef LLONG_MAX /* C89 */
#define LLONG_MAX LONG_MAX
#define LLONG_MIN LONG_MIN
#define ULLONG_MAX ULONG_MAX
#define long_long long
#else /* C99 */
#define long_long long long
#endif
Can I simply write something such as #define (long long) long, so that I
don't need the else branch above, and I don't have to use non-standard
identifiers such as long_long?
--
#include <stdio.h>
#include <stdlib.h>
int main(void) /* Don't try this at home */ {
const size_t dim = 256; int i;
for (i=0; malloc(dim); i++) /*nothing*/ ;
printf("You're done! %zu\n", i*dim);
puts("\n\n--Army1987"); return 0;
}
else?
For example, suppose I write:
#include <limits.h>
#ifndef LLONG_MAX /* C89 */
#define LLONG_MAX LONG_MAX
#define LLONG_MIN LONG_MIN
#define ULLONG_MAX ULONG_MAX
#define long_long long
#else /* C99 */
#define long_long long long
#endif
Can I simply write something such as #define (long long) long, so that I
don't need the else branch above, and I don't have to use non-standard
identifiers such as long_long?
--
#include <stdio.h>
#include <stdlib.h>
int main(void) /* Don't try this at home */ {
const size_t dim = 256; int i;
for (i=0; malloc(dim); i++) /*nothing*/ ;
printf("You're done! %zu\n", i*dim);
puts("\n\n--Army1987"); return 0;
}