MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Reading, Modifying,and Writing a file with data with quotation marks

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29434] RE: [mg29406] Reading, Modifying,and Writing a file with data with quotation marks
  • From: "JOHN C ERB" <JOHN_C_ERB at prodigy.net>
  • Date: Tue, 19 Jun 2001 05:35:49 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

It didn't appear to me to be difficult either, but after two hours of
trying, I thought I would ask for suggestions.

1. Place two "0"'s after "21.87" seems perfectly clear to me.  It's only
going to
be modified once, but how does that make a difference?

2. I tried Excel without success.

John C. Erb

-----Original Message-----
From: Tomas Garza [mailto:tgarza01 at prodigy.net.mx]
To: mathgroup at smc.vnet.net
Subject: [mg29434] Re: [mg29406] Reading, Modifying,and Writing a file with data
with quotation marks


The problem doesn't appear to be difficult, and it's just a matter of
playing around with string operations. I have only two questions:
1. Your modifications are too casuistic. E.g., "place two "0"'s after
"21.87" on the first line". Is this the file going to be modified only once,
or do you have a more general rule for the modifications?
2. Is the modified file going to be used in Mathematica, or once it is
modified it goes back for use with other applications (if so, it could be
modified with, say, Excel or other such program)?

Tomas Garza
Mexico City

----- Original Message -----
From: "JOHN C ERB" <JOHN_C_ERB at prodigy.net>
To: mathgroup at smc.vnet.net
Subject: [mg29434] [mg29406] Reading, Modifying,and Writing a file with data with
quotation marks


> Greetings,
>
> I would like to modify a data file on disk which has
> the data enclosed in quotation marks.
> A much-shortened example would be as follows:
>
> File as stored on disk
>
> "big","left","15","21.87","","0","smy"
> "82","back","up","24","50","0","984"
> "44","","up","symm"
>
> I would like to read this file into Mathematica,
> then (for example), place two "0"'s after "21.87" on the first line,
> place three "0"'s after "50" on the second line, then
> store the result back onto a file on disk giving
>
> "big","left","15","21.87","0","0","","0","smy"
> "82","back","up","24","50","0","0","0","0","984"
> "44","","up","symm"
>
> My stumbling block is mainly the quotation marks.
>
> Thank you,
> John C. Erb
> email: John_C_Erb at prodigy.net
>
>



  • Prev by Date: Re: Reading, Modifying, and Writing a file with data with quotation marks
  • Next by Date: Re: Errors im Mathematica??
  • Previous by thread: RE: Simple question
  • Next by thread: SIAM Short Course on Mathematical Software