NSArray vs. embedded loop in C?
NSArray vs. embedded loop in C?
- Subject: NSArray vs. embedded loop in C?
- From: Michèle Garoche <email@hidden>
- Date: Mon, 5 Aug 2002 19:19:36 +0200
Hello,
I need to build an array of strings corresponding to the representation
of digits in any base allowed by the compiler.
This array will be used in two places.
At the moment, the array is written in C and duplicated in both places:
// Build the representation
int i = 0;
char repr[myRadix];
while (i < myRadix)
{
repr[i] = (i > 9) ? '17' + i : '0' + i;
i++;
}
Would it be better to use an NSArray and no duplicate?
Michhle
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.