From: "David Frank" <dave_frank@hotmail.com>, RoadRunner - Central Florida
Date: Mon, 24 Nov 2003 16:03:05 GMT
PL/I's string handling is VASTLY SUPERIOR to Fortran's.
It has many more functions, and better ones, than those in Fortran.
This is the same heap of rubbish that you were peddling
several months ago in comp.lang.fortran and here,
for which you received a lot of flak from Forran gurus.
This Fortran program relies on a bug in your compiler that allows
it to be deceived into accepting a function reference
having one argument, when the actual function has two
dummy arguments. It's not Fortran, and it won't work
on other Fortran compilers, and won't work with
the next upgrade of your compiler. Have you submitted
a bug report?
In other words, it's garbage.
It has no place in the programming arena.
! !-----------------
! program parse_text
! character(50) :: line = 'remove blanks, reverse string using array syntax'
! call parse(line)
! write (*,*) line ! " xatnysyarragnisugnirtsesrever,sknalbevomer"
! end program
! ! --------------------------------
! subroutine parse(string) ! strip blanks and reverse string
! character(*) :: string ! via char array pack function
! character,pointer :: a(

! integer :: n
! interface
! function S2P(s) result(p)
! character(*),target :: s
INCONSISTENCY BETWEEN s AND ITS DECLARATION IN THE FUNCTION.
! character,pointer :: p(

! end function
! end interface
! a => S2P(string) ! equate array to string
FUNCTION REFERENCE HAS ONE ARGUMENT.
! n = len_trim(string) ! #chars in string
! a(n:1:-1) = PACK( a(1:n), a(1:n) /= ' ', SPREAD(' ',1,n) )
! end subroutine
! ! -----------------------------
! function S2P(s,n) result(p)
FUNCTION HAS TWO DUMMY ARGUMENTS.
! integer :: n
! character,target :: s(n)
! character,pointer :: p(

! p => s
! end function