ftp.nice.ch/pub/next/developer/resources/libraries/libcoll.931026.s.tar.gz#/libcoll-931026/tests/test5.m

This is test5.m in view mode; [Download] [Up]

#include <coll/coll.h>

main()
{
  id a = [[Array alloc] initEncoding:@encode(int)];
  int i;

  [a addElementsCount:5, 
     ((elt){0}),((elt){1}),((elt){2}),((elt){3}),((elt){4})];
  [a printForDebugger];
  i = [a indexOfElement:99 
	 ifAbsentCall:
	 LAMBDA(unsigned, (arglist_t f), {return 42;})];
  
  printf("This should be 42---> %d\n", i);
  exit(0);
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.