- #1
JamesWMH
- 3
- 0
Won't Compile the simplest of programs! Am I being stupid?
Hi, I'm just getting my teeth back into Fortran 90 I had a course on it last year, and just want to familirise myself with it before I apply for post grad stuff.
Anyway, the program i have written is:
program emosix
real:: a, roota
write(*,*) 'Type an interger to find the square root (must be a positive number)'
read(*,*) a
if(a>=0.0)
stop
roota = sqrt(a)
write(*,*) 'The sqaure root of ', a, ' = ', roota
pause
end program emosix
and I get the error code:
Error: Cannot assign to a named constant at (1)
C:\Users\James\Documents\Programming\Emo6\~emo6.f90:15.5:
pause
1
Warning: Deleted feature: PAUSE statement at (1)
The warning about deleted feature hasn't made any difference in the past, so I don't think its that, but I have no idea what the cannot assign... part means?? Any ideas?
Thanks Jim
Hi, I'm just getting my teeth back into Fortran 90 I had a course on it last year, and just want to familirise myself with it before I apply for post grad stuff.
Anyway, the program i have written is:
program emosix
real:: a, roota
write(*,*) 'Type an interger to find the square root (must be a positive number)'
read(*,*) a
if(a>=0.0)
stop
roota = sqrt(a)
write(*,*) 'The sqaure root of ', a, ' = ', roota
pause
end program emosix
and I get the error code:
Error: Cannot assign to a named constant at (1)
C:\Users\James\Documents\Programming\Emo6\~emo6.f90:15.5:
pause
1
Warning: Deleted feature: PAUSE statement at (1)
The warning about deleted feature hasn't made any difference in the past, so I don't think its that, but I have no idea what the cannot assign... part means?? Any ideas?
Thanks Jim