• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
ObjC stdin equivalent? and other questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ObjC stdin equivalent? and other questions


  • Subject: ObjC stdin equivalent? and other questions
  • From: William Squires <email@hidden>
  • Date: Fri, 10 Jun 2011 21:56:23 -0500

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?
  I'm guessing... zilch. You have to use the standard C libraries, right? Or is there an OO way of reading/writing to stdio (and stderr) from a console app? Or use ObjC++...


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...) Or do apps like vim, emacs, pico, etc... use custom machine-language calls to the darwin core to do this?
  If it helps, under Terminal.app's Prefs | Text, I have "Use bold fonts", "Allow blinking text" and "Display ANSI colors" all checked, and under Prefs | Window I have window size set for 80x24 with unlimited scrollback, and under Prefs | Advanced, I have "Declare terminal as:" set to xterm-color, "Paste newlines as carriage returns" and "Scroll to bottom on input" checked.

3rd question:
  Are all the C libraries (with the possible exception of <stdio.h>) available in iOS 3 and later?

4th question:
  Are there any plans to include NumberFormatter and DateFormatter in iOS 5 (or later)? If not, what's the recommended way of filtering/displaying/validating input in a UITextField that I want to only have valid floating-point values when I go to do calculations on them.




_______________________________________________

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

  • Follow-Ups:
    • Re: ObjC stdin equivalent? and other questions
      • From: Jens Alfke <email@hidden>
    • Re: ObjC stdin equivalent? and other questions
      • From: Chris Hanson <email@hidden>
    • Re: ObjC stdin equivalent? and other questions
      • From: Conrad Shultz <email@hidden>
    • Re: ObjC stdin equivalent? and other questions
      • From: Ken Thomases <email@hidden>
    • Re: ObjC stdin equivalent? and other questions
      • From: Sherm Pendley <email@hidden>
    • Re: ObjC stdin equivalent? and other questions
      • From: Dave DeLong <email@hidden>
  • Prev by Date: Re: NSInputStream created from NSData - expected it to close at end of data, did not happen
  • Next by Date: Re: ObjC stdin equivalent? and other questions
  • Previous by thread: setLineWidth: in NSBezierPath no effect in PDF Document?
  • Next by thread: Re: ObjC stdin equivalent? and other questions
  • Index(es):
    • Date
    • Thread