List comprehensions: Difference between revisions

Content deleted Content added
m →‎{{header|REXX}}: changed some comments, added/changed whitespace.
Aamrun (talk | contribs)
Added notes for C99
Line 374:
C doesn't have a built-in syntax for this, but any problem can be solved if you throw enough macros at it:
{{works with|GCC}}
The program below is C11 compliant. For C99 compilers change line 57 :
<lang C>
for (int i = f + 1; i <= t; i ++) { e = e->nx = listNew(sizeof i, &i); }
</lang>
to
<lang C>
int i;
for (i = f + 1; i <= t; i ++) { e = e->nx = listNew(sizeof i, &i); }
</lang>
Output remains unchanged.
<lang c>
#include <stdlib.h>