Re: Converting NSString to char constant (answered)
Re: Converting NSString to char constant (answered)
- Subject: Re: Converting NSString to char constant (answered)
- From: Clark Cox <email@hidden>
- Date: Sat, 3 Jan 2004 01:36:48 -0500
On Jan 03, 2004, at 01:28, KLW wrote:
>
Dear Mr. Cox:
>
>
Thank you for your response. Just to reassure you, my program is set
>
up such that the only possible results will be either 'C', 'N', 'I',
>
or 'E' -- well within the ASCII range.
>
But I hadn't thought of the possibility that there would be a problem,
>
and I thank you for pointing it out. As it is, the solution actually
>
doesn't work without the char cast. Perhaps I could have said:
>
unichar cResult = (unichar)[resultAsNSString characterAtIndex:0]
You don't need any cast there, just write:
unichar cResult = [resultAsNSString characterAtIndex:0]
>
;
>
>
Anyone know if I can use a unichar in a switch() case construct?
Yes, you can use any integer type with switch()
--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.