Re: parsing a txt file

new topic     » goto parent     » topic index » view thread      » older message » newer message

On 25 Nov 2004, at 14:06, spent memory wrote:

> 
> i am reading into my program a text file. in this text file i seek to
> a certain line and assign 1 of my variables the value which happens to
> be 20. however when i goto use this variable later i get a type check
> failure saying the variable is {50,48,10}. I know this converts to 20
> but i have forgotten how to convert it so that i can use it. can
> someone please remind me. thanks

I do 1000's of pages of html per day of text extraction and parsing, and i have 
no idea what you are talking about. How do you get sequence {50,48,10} 
from an atom 20? If the one line is "20\r", i can see that happening. Why not 
just grab the whole file and then use 

parseddata = parse(data,{10,13})
or
parseddata = parse(data,{'\r','\n'})

? Then line one is parseddata[1], line 50 is parseddata[50], etc.

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu