Re: setting KINE 10 in fort files

From: Simon Sirca (sirca@crex.mit.edu)
Date: Thu Nov 01 2001 - 18:33:21 EST


Hi, Jason,

I am not surprised what you have described regarding the type conversions.
The implicit type conversions in fortran are compiler dependent, but in
general, it is clear that reading numbers from files into variables
needs to be type-matched or else the effects will be unpredictable.
On the other hand, the geant routines implement well-defined type
conversions. In particular, for the ffread routine:

-- If the key is of type 'REAL' and the item found is an integer,
   the integer is converted to the corresponding floating point value
   before storing.
-- If the key is of type 'INTEGER' and the item found is a floating-point
   number, the value stored is the result of the FORTRAN function IFIX.

Had this careful conversion been skipped, then entering values of a
mismatched type from a prompt would also cause an error at some point.
I think this is all consistent what you observed.

Simon

-- 
  Simon Sirca
  MIT-LNS, Room 26-402                 Tel: +1 617 258-5438
  77 Massachusetts Avenue              Fax: +1 617 452-5950
  Cambridge, MA 02139-4307, USA        URL: http://pierre.mit.edu/~sirca



This archive was generated by hypermail 2.1.2 : Mon Feb 24 2014 - 14:07:28 EST