Re: Fortran DINT help
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Mon, 30 Apr 2007 10:44:30 -0800
jon wrote:
(snip)
It will help to have a good Fortran 77 Language Reference available.
For example, look at http://www.sinc.sunysb.edu/UNIX/compilers/fortran/f77rm/index.html
. For DINT, look at the section on Intrinsic Functions.
(snip)
For intrinsic functions (such as DINT) refer to the language reference
for the type of argument and type of return value. Note that DINT is
an archaic dialect for the generic INT. It is most often found in
very old code, or code written by old cod(g)ers or novices who are
confused about (or ignorant of) what a generic function is.
DINT is the specific name for the generic AINT, which has a someone
different use from INT.
DINT and AINT are used when one wants to truncate the fractional
part of a floating point value, but keep it in floating point form.
The results if AINT(1e30) and INT(1e30) will likely be different
(until 128 bit processors become popular).
I still believe that DFLOAT(i) is easier to read than
REAL(i,KIND(1.d0)), but I probably wouldn't use DINT
over AINT.
-- glen
.
- Follow-Ups:
- Re: Fortran DINT help
- From: Richard Maine
- Re: Fortran DINT help
- References:
- Fortran DINT help
- From: mustafaalperkoc
- Re: Fortran DINT help
- From: jon
- Fortran DINT help
- Prev by Date: Re: I/O in PURE and ELEMENTAL procedures in Fortran 2008
- Next by Date: Re: I/O in PURE and ELEMENTAL procedures in Fortran 2008
- Previous by thread: Re: Fortran DINT help
- Next by thread: Re: Fortran DINT help
- Index(es):
Relevant Pages
|
|