[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: io format specifier question
From: |
A. Kalten |
Subject: |
Re: io format specifier question |
Date: |
Tue, 1 Jul 2008 14:24:59 -0400 |
On Tue, 1 Jul 2008 20:02:36 +0200
"marco restelli" <address@hidden> wrote:
> I need to read an ASCII file containing floating point numbers as
>
> 0.112977-141
>
> which stands for 0.112977E-141 (i.e., the E is omitted). The point is,
> fscanf(fp,'%e') treats this as two numbers
>
If you're on a unix system, just do:
sed s/-/e-/ file > file-new
This will convert all "0.112977-141" to "0.112977e-141"
AK