C This software REVERSE.FOR is part of the Visual Fortran kit.
C
C This software is provided as an example that demonstrates a particular
C feature/function of the licensed product. The software is not intended to
C provide a complete solution to any application problem but rather is provided
C as a teaching mechanism.
C
C Users may incorporate any part of this sample into their own source after 
C making appropriate changes to make it suitable for the intended application.
C
C
	SUBROUTINE REVERSE(S)
	!DEC$ ATTRIBUTES DLLEXPORT :: REVERSE
	CHARACTER T, S*(*)

	J = LEN(S)
	IF (J .GT. 1) THEN
	    DO 10 I=1, J/2
		T = S(I:I)
		S(I:I) = S(J:J)
		S(J:J) = T
		J = J-1
10              CONTINUE
	    ENDIF

	RETURN
	END
