Re: Slightly cheeky programming request



In article <1301ti3ofturfb@xxxxxxxxxxxxxxxxxx>, Graham J Lee wrote:
On 21/3/07 08:47, Jim wrote:
It looks like I might - again - try to learn coding on the Mac. However, I've
got a specific purpose in mind and a small request:

Could someone show me some example code that does the following -

Opens a text file for reading.
Reads 68 lines and puts each line into an array element.
Closes the file.

The text file would just be a list of filenames, say no more than 40 chars to a
line.

I've got the Hillegass book, so I'll be starting from scratch on that but from a
quick look at the contents page it doesn't cover file handling, at least not as
a self contained section.

You will need the following methods:
+[NSString stringWithContentsOfFile:]
-[NSString componentsSeparatedByString:]

Ah, now they look very interesting. Thanks.

Jim
--
Find me at http://www.ursaMinorBeta.co.uk

Please help to bring two classic works of whisky literature back into print
by visiting http://www.ClassicExpressions.co.uk Thank you.
.



Relevant Pages

  • Slightly cheeky programming request
    ... It looks like I might - again - try to learn coding on the Mac. ... got a specific purpose in mind and a small request: ...
    (uk.comp.sys.mac)
  • Re: Slightly cheeky programming request
    ... In article <slrnf01s9e.11jr.jim@xxxxxxxxxxxxxxxxxxxx>, Jim wrote: ... got a specific purpose in mind and a small request: ...
    (uk.comp.sys.mac)
  • Re: Dawkins and natural selection contradicts himself
    ... "..Natural selection, the unconscious, automatic, blind yet ... direct or indirect product of Darwinian natural selection. ... he first tell us that NS has no purpose ... and one that the human mind is prone to (let alone ...
    (talk.origins)
  • Re: Fabric with robbins nests and eggs
    ... I'd be planning a "farm accident". ... De-STUFF email address to reply ... Does Lee know how to put his foot in his mouth until he tastes his ... pretty nice and I wouldn't mind having a look see at it. ...
    (rec.crafts.textiles.quilting)
  • Re: Trying to use STRING
    ... Why do these request for help result in people trying to 'outcode' ... 'this is what comes to my mind'; you asked for help with code and coders ... response, will key in the numeral '8'. ... Once it is cleaned up I'd say the mechanism (use of common area and code) ...
    (comp.lang.cobol)