float conversion error
Steve Kargl
sgk@troutmask.apl.washington.edu
Thu Aug 18 06:02:00 GMT 2005
On Thu, Aug 18, 2005 at 05:04:06AM +0000, Jack Howarth wrote:
> In compiling whatcheck tonight with gfortran from current gcc main
> trunk (with the byte patch applied), I noticed on compile error that
> I don't see a workaround for. The error is...
>
> gfortran -x f77 -DUNIX -DCTEXT -DF2C -DGLX11 -DX11 -DDX4 -DLITE
> -DWHATCHECK -O3 -c -o electr.o electr.f
> In file ../whatif/src/electr.f:2306
>
> ELNB2R=(FLOAT(GRID(NX,NY,NZ))-FLOAT(IPLUS(MAPNOW)))/
> 1
> Error: Type of argument 'a' in call to 'float' at (1) should be
> INTEGER(4), not INTEGER(2)
>
> The GRID array is declared as an INTEGER*2 array. Is there an easy work
> around for this problem?
> Jack
You might try to change FLOAT to REAL.
--
Steve
More information about the Fortran
mailing list