Menu

#128 Interface for plstyl in f95 binding is incorrect

open
nobody
None
5
2013-01-15
2013-01-15
No

The interface for plstyl in sfstubsf95.f90 is currently:

861 interface
862 subroutine plstyl( n, mark, space )
863 integer :: n, mark, space
864 end subroutine plstyl
865 end interface

However, it should take arrays for mark and space, so I think it should be either:
interface
subroutine plstyl( n, mark, space )
integer :: n
integer, dimension(n) :: mark, space
end subroutine plstyl
end interface

or (better) provide a wrapper so that is appeas to be

interface
subroutine plstyl(mark, space )
integer, dimension(:) :: mark, space
end subroutine plstyl
end interface

Discussion

  • Arjen Markus

    Arjen Markus - 2013-01-16

    Oops, that is a mistake indeed. Thanks for spotting this one.
    I prefer the wrapper, as this is in line with the philosophy used in the
    other interfaces.

     
  • Arjen Markus

    Arjen Markus - 2013-01-16

    Hm, the examples use a scalar version of this routine. So, it should be an
    interface that allows both forms.

     
  • James Tappin

    James Tappin - 2013-01-17

    I think the wrapper is the proper way to go, but I was concerned that just having that would break existing codes. OTOH using e.g.

    draw = [1000, 100, 100]
    move = [900,900,900]
    call plsytl(3, draw(1), move(1))

    definitely looks cludgy, so maybe there aren't too many codes outside the examples using it.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.