Fortran中开根号函数QRST的调用我的程序:program examimplicit nonereal vreal sqrtopen(2,file='F:\6.txt',status='replace') v=sqrt(4)write(2,*) vend结果出错提示:Error:This name does not have a type,and must have an explicit type.[SQ
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/29 10:07:33
![Fortran中开根号函数QRST的调用我的程序:program examimplicit nonereal vreal sqrtopen(2,file='F:\6.txt',status='replace') v=sqrt(4)write(2,*) vend结果出错提示:Error:This name does not have a type,and must have an explicit type.[SQ](/uploads/image/z/12545804-20-4.jpg?t=Fortran%E4%B8%AD%E5%BC%80%E6%A0%B9%E5%8F%B7%E5%87%BD%E6%95%B0QRST%E7%9A%84%E8%B0%83%E7%94%A8%E6%88%91%E7%9A%84%E7%A8%8B%E5%BA%8F%EF%BC%9Aprogram+examimplicit+nonereal+vreal+sqrtopen%282%2Cfile%3D%27F%3A%5C6.txt%27%2Cstatus%3D%27replace%27%29+v%3Dsqrt%284%29write%282%2C%2A%29+vend%E7%BB%93%E6%9E%9C%E5%87%BA%E9%94%99%E6%8F%90%E7%A4%BA%EF%BC%9AError%3AThis+name+does+not+have+a+type%2Cand+must+have+an+explicit+type.%5BSQ)
Fortran中开根号函数QRST的调用我的程序:program examimplicit nonereal vreal sqrtopen(2,file='F:\6.txt',status='replace') v=sqrt(4)write(2,*) vend结果出错提示:Error:This name does not have a type,and must have an explicit type.[SQ
Fortran中开根号函数QRST的调用
我的程序:
program examimplicit nonereal vreal sqrtopen(2,file='F:\6.txt',status='replace') v=sqrt(4)write(2,*) vend
结果出错提示:
Error:This name does not have a type,and must have an explicit type.[SQRT]
Warning:Arguments' data types are incompatible with intrinsic procedure,assume EXTERNAL.[SQRT]
请问怎么调用啊?
Fortran中开根号函数QRST的调用我的程序:program examimplicit nonereal vreal sqrtopen(2,file='F:\6.txt',status='replace') v=sqrt(4)write(2,*) vend结果出错提示:Error:This name does not have a type,and must have an explicit type.[SQ
应该这样
program exam
real v
open(2,file='6.txt',status='unknown')
v=sqrt(4.0)
write(2,*) v
close(2)
call system('c:\windows\notepad.exe 6.txt')
end
既然V是real
sqrt(4.0)中间应该是4.0