	SUBROUTINE FLIP (VEC,SIZE,PT)
C COPYRIGHT (C) 1983 GLENN EVERHART
C PERMISSION IS GIVEN TO ANYONE TO USE, DISTRIBUTE, OR COPY THIS
C PROGRAM FREELY BUT NOT TO SELL IT COMMERICALLY.
	INCLUDE 'VKLUGPRM.FTN'
C	PARAMETER RRW = 32
C	PARAMETER RCL = 32
C RRW=MAX REAL ROWS
C RCL=MAX REAL COLS
C RRW MUST BE 1 LARGER TO HANDLE 1ST 27 VARIABLES IN AVBLS
C VBLS AND TYPE DIMENSIONED RRW,RCL
C **************************************************
C *                                                *
C *         SUBROUTINE FLIP(VEC,SIZE,PT)           *
C *                                                *
C **************************************************
C
C
C  FLIPS THE NON-ZERO DIGITS UP TO PT IN VECTOR VEC IN REVERSE
C  ORDER.  USED TO PLACE NUMBERS IN PROPER ORDER INTO VBLS THAT 
C  HAVE BEEN READ IN HIGH ORDER FIRST.
C
C
C
C
C FLIP IS CALLED BY NEXTEL
C
C MODIFICATION CLASSES: -
C
C
C
C
C   VARIABLE   USE
C
C     H1     TEMPORARILY HOLDS A LOGICAL*1 VALUE
C     I      INDEXES DIGITS THAT ARE FLIPPED.
C     K      THE MIDPOINT OF THE FLIPPING ACTION.
C     PT     HOLDS THE RANGE OF THE FLIPPING ACTION.
C            (USUALLY THE HIGH ORDER NON-ZERO DIGIT)
C
C
C
C
C
C
C
C
C
C
C	SUBROUTINE FLIP (VEC,SIZE,PT)
C
C
	InTEgeR*4 SIZE,PT
	InTEgeR*4 K
C
	LOGICAL*1 VEC(SIZE), H1
C
C
	K=PT/2
	IF (K.EQ.0) GOTO 20
	DO 10 I=1,K
	H1=VEC(I)
	VEC(I)=VEC(PT+1-I)
10	VEC(PT+1-I)=H1
20	RETURN
	END
