Re: Parsing cString - Silly question
Re: Parsing cString - Silly question
- Subject: Re: Parsing cString - Silly question
- From: Wain <email@hidden>
- Date: Fri, 18 Nov 2005 15:24:33 +0000
On 18 Nov 2005, at 15:13, Lorenzo wrote:
Hi,
how can I add an element to an array of float?
I am parsing a text file contains variables, but until I parse the
whole
text I cannot know how many variables that text contains.
Actually I parse the text twice. The first time I count the variables.
Is a way to do everything in one loop only? Will be faster?
You could use an NSNumber to store the float and then use an
NSMutableArray to store the numbers, assuming your using
Cocoa and you don't really need a float array?!?.
It depends on the size of the file and your parsing mechanism
as to any speed loss/gain, you won't need to parse twice though
as you can simply make the array bigger as you go...
If you are creating the text file rather than being supplied it, you
could
even change the file format and use a property list to store the
variables :-)
Wain
___________________________________________________________
WIN ONE OF THREE YAHOO! VESPAS - Enter now! - http://uk.cars.yahoo.com/features/competitions/vespa.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden