mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 10:11:03 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1 72102866-910b-0410-8b05-ffd578937521
16 lines
264 B
Objective-C
16 lines
264 B
Objective-C
#include <objects/objects.h>
|
|
|
|
int main()
|
|
{
|
|
id a = [[Array alloc] initWithType:@encode(int)];
|
|
int i;
|
|
void plus2 (elt e) {printf("%d ", e.int_u+2);}
|
|
|
|
for (i = 0; i < 10; i++)
|
|
[a addElement:i];
|
|
|
|
[a withElementsCall:plus2];
|
|
|
|
printf("\n");
|
|
exit(0);
|
|
}
|