Hi,
I am new to Fortran...but not programming. Why won't this program work? I can print integers but not reals.
PROGRAM print_real
IMPLICIT NONE
REAL :: x
x=3.14
PRINT *,x
END PROGRAM print_real
It compiles fine with gfortran (v12.3.0) but when run gives the following...
"Program received signal SIGILL: Illegal instruction.
Backtrace for this error."
The above program runs using a Fortran77 compiler, though. I installed gcc-12.3.0-32.exe and am running Windows Vista on a 32-bit machine.
I've downloaded kindfinder.F90, and have tried all sorts of KINDs (2,4,8,16) and different precisions and ranges (using SELECTED_REAL_KIND).
I BET the solution is blindingly simple. MANY thanks.
Rdflg
I am new to Fortran...but not programming. Why won't this program work? I can print integers but not reals.
PROGRAM print_real
IMPLICIT NONE
REAL :: x
x=3.14
PRINT *,x
END PROGRAM print_real
It compiles fine with gfortran (v12.3.0) but when run gives the following...
"Program received signal SIGILL: Illegal instruction.
Backtrace for this error."
The above program runs using a Fortran77 compiler, though. I installed gcc-12.3.0-32.exe and am running Windows Vista on a 32-bit machine.
I've downloaded kindfinder.F90, and have tried all sorts of KINDs (2,4,8,16) and different precisions and ranges (using SELECTED_REAL_KIND).
I BET the solution is blindingly simple. MANY thanks.
Rdflg