Re: ObjC stdin equivalent? and other questions
Re: ObjC stdin equivalent? and other questions
- Subject: Re: ObjC stdin equivalent? and other questions
- From: Sherm Pendley <email@hidden>
- Date: Fri, 10 Jun 2011 23:05:33 -0400
On Fri, Jun 10, 2011 at 10:56 PM, William Squires <email@hidden> wrote:
> Hi!
> 1st question:
> In regular C, you have the <stdio.h> functions for reading/writing to stdio; printf(), scanf(), etc...
> In C++, you have cin/cout and the overridden '>>' and '<<' operators.
> What does ObjC have (besides NSLog() anyway) that C/C++ doesn't?
NSFileHandle methods:
+fileHandleWithStandardInput
+fileHandleWithStandardError
+fileHandleWithStandardOutput
> I'm guessing
Why? Just look at the standard I/O classes - it's right there in the
reference material.
> 2nd question:
> Can a console app control the text 'cursor' in Terminal.app's window solely through stdio? (i.e. are there control codes that clear the screen, locate the cursor at some x,y location, set the text color/brightness (I know the man page reader can, at the very least, change the text brightness), position the cursor at the beginning/end of a line, etc...)
You *could* deal with ANSI escape codes manually, but it's a massive
PITA. Far easier to use something like Curses.
> Are all the C libraries (with the possible exception of <stdio.h>) available in iOS 3 and later?
I haven't dived into iOS development yet, so I can't answer that one.
> Are there any plans to include NumberFormatter and DateFormatter in iOS 5 (or later)?
If there are, no one who knows of them can tell you about them. That
kind of thing is covered under NDA, and Apple takes those quite
seriously.
sherm--
--
Cocoa programming in Perl:
http://camelbones.sourceforge.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden