mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
coding fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8569 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
559db76abd
commit
ead63e6999
4 changed files with 220 additions and 21 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <Foundation/NSAutoreleasePool.h>
|
||||
#include <Foundation/NSSet.h>
|
||||
#include <Foundation/NSUtilities.h>
|
||||
#include <Foundation/NSValue.h>
|
||||
#include <Foundation/NSDate.h>
|
||||
|
||||
int main()
|
||||
|
@ -24,14 +25,19 @@ int main()
|
|||
|
||||
/* Create a Set of int's */
|
||||
set = [[NSSet alloc] initWithObjects:
|
||||
@"apple", @"banana", @"carrot", @"dal", @"escarole", @"fava", nil];
|
||||
@"apple", @"banana", @"carrot", @"dal", @"escarole", @"fava",
|
||||
[NSValue valueWithPoint: NSMakePoint(1,1)],
|
||||
[NSValue valueWithSize: NSMakeSize(11,11)],
|
||||
[NSValue valueWithRange: NSMakeRange(10,2)],
|
||||
[NSValue valueWithRect: NSMakeRect(11,11,22,22)],
|
||||
nil];
|
||||
|
||||
/* Display the set */
|
||||
printf("Writing:\n");
|
||||
{
|
||||
id o, e = [set objectEnumerator];
|
||||
while ((o = [e nextObject]))
|
||||
printf("%s\n", [o cString]);
|
||||
printf("%s\n", [[o description] cString]);
|
||||
}
|
||||
|
||||
apl = [[NSAutoreleasePool alloc] init];
|
||||
|
@ -73,7 +79,7 @@ printf("%u\n", [arc retainCount]);
|
|||
{
|
||||
id o, e = [set objectEnumerator];
|
||||
while ((o = [e nextObject]))
|
||||
printf("%s\n", [o cString]);
|
||||
printf("%s\n", [[o description] cString]);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue