On Jan 11, 2009, at 1:28 AM, ewan.dela...@math.unicaen.fr wrote:

If you must work character-by-character,
use character constants (e.g. >'0' or '9')

 In that (unlikely) situation, how would I test, say, equality
of characters ? For example, if I needed to know whether
character number j in aString is '7', writing
  ([aString characterAtIndex:j]=='7') wouldn't work, would it ?

Sure it would. Both unichar (as typedef'd) and char are integer types in C. '7' is another way of writing a number, although not the number 7. Which number depends on the encoding of your source file, but in most modern systems it would be ASCII or UTF-8. (I don't know if, for example, EBCDIC is still used on any modern systems.) In either of those, '7' is the same as 0x37 or 55.

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to