#10 Error in function gnuplot_load

open
nobody
None
5
2012-07-30
2012-07-30
Alessio Siravo
No

Hi, I think I have found an error in the gnuplot_fortran95.f90 file at lines 1374/1381 (function gnuplot_load) in the conditions of the if statements.
This is the original code:

....
ierror=fortran_access(trim(loadfile),0)
if(status.ne.0) then
status=-1
call assert_error('gnuplot_load','cannot find the specified load file '//trim(loadfile),status)
return
end if

ierror=fortran_access(trim(loadfile),4)
if(status.ne.0) then
status=-2
call assert_error('gnuplot_load','you do not have read permissions for the specified load&
&file '//trim(loadfile),status)
return
end if
....

I think that the conditions in the if statement should be:
if(ierror.ne.0) then ...
in both of the cases.

I've changed the code and compiled it with gfortran 4.6 and it works well!

I hope this could help someone.

Discussion