#123 Example plplot-5.9.9/examples/f95/x09f.f90 has wrong bounds

closed-fixed
nobody
None
5
2012-02-01
2012-01-31
Anonymous
No

The example has (cf. x02f.f90):

function arange_plflt_1( start, stop, step )
integer, intent(in) :: start, stop, step
real(kind=plflt), dimension((stop-start)/step) :: arange_plflt_1

but uses in plplot-5.9.9/examples/f95/x09f.f90

integer, parameter :: xdim=99, nptsx=35
real(kind=plflt) :: &
xg1(xdim)

xg1 = coord_function( arange(0,nptsx) / dble(nptsx-1), distort )

The latter is wrong: The LHS has the bounds (1:99) while the RHS has the bounds (1:35).

Cf. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52059

Discussion

  • Arjen Markus
    Arjen Markus
    2012-01-31

    I will have to check and correct that - thanks for reporting.

     
  • Arjen Markus
    Arjen Markus
    2012-02-01

    Done. The assignments are now:

    xg1(1:npltsx) = ...
    yg1(1:npltsy) = ...

    so that only the relevant parts of the two arrays are filled.

     
  • Arjen Markus
    Arjen Markus
    2012-02-01

    • status: open --> closed-fixed