From: Bil Kleb Date: 2007-05-02T19:50:06+09:00 Subject: Inverse scanf: finding format specifers of existing fields Hi, I have files full of numbers that I need to twiddle, but the format of the numbers cannot change[1], e.g., '0.4577' -> '0.7728' or '-2.345e-02' -> ' 1.232e-03' Using scanf for the output seems to be the solution to the second half of the problem, but how does one derive the format specifier string of the input fields, which vary? Thanks, -- Bil Kleb http://fun3d.larc.nasa.gov [1] Legacy formatted-Fortran data files.