help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unwrapping lines


From: Girish Kulkarni
Subject: unwrapping lines
Date: 17 Apr 2007 22:34:54 -0700
User-agent: G2/1.0

Hello,

I'm stuck with a curious problem and wonder if I can solve it in
Emacs. I have a data file produced by Mathematica that lists four
quantities. High precision means these numbers tend to be long so
Mathematica often has to truncate lines. It does so by putting in a
backslash and continuing on the next line. For example:

0.17000000000000004 0.10500954682364379 0.20481153067700028 0.309821\
0775006441
0.18000000000000005 0.12459404398470066 0.22952096247531506 0.354115\
0064600157
0.19000000000000006 0.14646262095984275 0.25562017297341694 0.402082\
7939332597

I need to use these data in a Fortran 77 program. But Fortran has
problems reading numbers in that format. In Emacs I can remove that
backslash easily but that doesn't solve my problem. (Fortran then
treats the continued digits as a fifth quantity. This "fifth quantity"
is sometimes present and sometimes absent.)

Is there any way in which I can "unwrap" the lines so that all four
quantities appear in the same line? For example, I want the above to
look like:

0.17000000000000004 0.10500954682364379 0.20481153067700028
0.3098210775006441
0.18000000000000005 0.12459404398470066 0.22952096247531506
0.3541150064600157
0.19000000000000006 0.14646262095984275 0.25562017297341694
0.4020827939332597

I've tried using M-x replace-string with C-q C-d C-q C-d and C-d C-d
to replace "\" with two DELETE characters. Didn't work. Could somebody
help?

Regards,
Girish

--
Girish Kulkarni
Allahabad, India



reply via email to

[Prev in Thread] Current Thread [Next in Thread]