|
|
|
|
|
by thesz
2011 days ago
|
|
Take a look at yalsat: http://fmv.jku.at/yalsat/ Unpack the "v" version, look at yals.c. You will see there the following: #define PUSH(S,E) \
do { \
if (FULL(S)) ENLARGE (S); \
*(S).top++ = (E); \
} while (0)
#define POP(S) \
(assert (!EMPTY (S)), *--(S).top)
#define TOP(S) \
(assert (!EMPTY (S)), (S).top[-1])
#define PEEK(S,P) \
(assert ((P) < COUNT(S)), (S).start[(P)])
#define POKE(S,P,E) \
do { assert ((P) < COUNT(S)); (S).start[(P)] = (E); } while (0)
These are definitions for typed dynamic arrays using C macros. Very useful.As you can see, there's a couple of assert()'s before actual computation of the address to fetch. I hope I proved you wrong. |
|
I don't see where you did - Animats said he couldn't find examples of the comma operator inside square brackets, not that he couldn't see it being used at all.