RMNLIB

(SORT)

BASE


SUBROUTINE SORT (WORK, N)


ARGUMENTS

IN

OUT


DESCRIPTION

This subroutine will sort an array of reals in increasing order.

EXAMPLE

        program try
        implicit none
        external SORT
        real WK(10),j
        integer i
c       fill array with numbers
        j=0.0 
        do 50 i=10,1,-1
           j=j+1.0
           WK(i)=j
   50   continue
        print *,'Array WK unsorted'
        print *,(WK(i),i=1,10)
c       sort the array
        CALL SORT(WK,10)
        print *,'Array WK after SORT'
        print *,(WK(i),i=1,10)
        end

SEE ALSO

isort,ipsort

Return to RPN home page
Return to product index