MathGroup Archive 1996

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

Search the Archive

Re: Reading Numbers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg5294] Re: Reading Numbers
  • From: Zvi Wiener <mswiener at pluto.mscc.huji.ac.il>
  • Date: Sat, 23 Nov 1996 01:44:36 -0500
  • Organization: Hebrew University of Jerusalem
  • Sender: owner-wri-mathgroup at wolfram.com

cserrat at bcn.servicom.es wrote:
> 
> Dear friends,
> 
> I have a problem in reading files with Mathematica:
> 
> I should read files containing columns of numbers.
> These numbers, generated by a Fortran based calculation, can have either the
> form .078945E+01 (where I do not find any problem) or the form .783482-150,
> where the function ReadList read two numbers: .783482, and -150, and here is
> my problem.
> 
> I use:
> ReadList["file",{Real,Real}]
> 
> I do many calculations, getting results in both forms, and I should not
> change the argument of ReadList every time, depending on the form of the result.
> Do you know how I could manage to read .783482-150 as a whole number (namely
> .783482E-150)?
> 
> Thank you.
> 
> Carles S.
> ****************************************************************************
> Carles Serrat i Jurado                          Tel: (34)-(3)-7398286
> Departament de Fisica i E.N.                          (34)-(3)-8833267
> Universitat Politecnica de Catalunya            Fax: (34)-(3)-7398101
> Colom 11, 08222-Terrassa                        email:  serrat at fen.upc.es
> SPAIN                                           cserrat at bcn.servicom.es
> ****************************************************************************

See p.206 in the Mathematica Book (THIRD EDITION!)
You should use Number instead of Real.

Sincerely,
Zvi Wiener.


  • Prev by Date: Re: reading/writing pictures
  • Next by Date: eigenvalues in mma
  • Previous by thread: Reading Numbers
  • Next by thread: Technical Support Engineer