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/11/28 19:18:23
Fortran中开根号函数QRST的调用我的程序:programexamimplicitnonerealvrealsqrtopen(2,file=''F:\6.txt'',status=''replace''

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