1MODULE Vcimage
2  CHARACTER (LEN=80), SAVE :: CARD, FIELD
3END MODULE Vcimage
4MODULE Vimage
5  LOGICAL, SAVE ::  EOFF
6END MODULE Vimage
7SUBROUTINE READIN(PROB, TITLE, CSTOP, FCYCLE, DCYCLE, DHIST, VHIST&
8     &    , IMAX, PHIST, DEBUG, NSTAT, STATS, MAXSTA, NCORE, PPLOT,     &
9     &    DPLOT, VPLOT, TPLOT, SLIST, D0, E0, NODES, SHEAT, GAMMA, COLD &
10     &    , THIST, NVISC, SCREEN, WEIGHT, TSTOP, STABF)
11  USE Vcimage
12  USE Vimage
13  INTEGER, DIMENSION(MAXSTA) :: STATS
14  IF (.NOT.EOFF) THEN
15     IF (FIELD=='PROB' .OR. FIELD=='PROBLEM_NUMBER') THEN
16        CALL QSORT (STATS(1:NSTAT))
17        WRITE (16,                                                 &
18             &'(//'' YOU HAVE REQUESTED A PRINTOUT OF THE STATION'',            &
19             &    '' ABORT''//)')
20     ENDIF
21  ENDIF
22CONTAINS
23  RECURSIVE SUBROUTINE QSORT (LIST)
24    INTEGER, DIMENSION(:), INTENT(INOUT) :: LIST
25    INTEGER, DIMENSION(SIZE(LIST)) :: SMALLER,LARGER
26    IF (SIZE(LIST) > 1) THEN
27       LIST(NUMBER_SMALLER+1:NUMBER_SMALLER+NUMBER_EQUAL) = CHOSEN
28       CALL QSORT (LARGER(1:NUMBER_LARGER))
29       LIST(NUMBER_SMALLER+NUMBER_EQUAL+1:) = LARGER(1:NUMBER_LARGER)
30    END IF
31  END SUBROUTINE QSORT
32END SUBROUTINE READIN
33