(      SUBROUTINE XXGCON (IA,NLINES,KINT)QC_TITLE XXGCON: Constrain variables and evaluate user functions in a row of data.
C_ARGUMENTS  B      INTEGER*2 IA(NLINES,1)   ![I] Array contains requested data.B      INTEGER*2 KINT	       ![I] Interval at which to sample data.C_VARIABLES			,      INCLUDE 'RAD$INC:XXCOM.INC/LIST'      #					 !Uses: J1,J2. Modifies: none.'      INCLUDE 'RAD$INC:XXGCOM.INC/LIST'*C					 Uses: INT, IDCON, IFUN, ICOL, NFUN.C					 Modifies: none.GC_DESCRIPTION  The subroutine XXGCON constrains variables and evaluatesFC user functions in a row of data for the generalized variable programFC package.  XXGCON assumes the time variable is the first constraint, GC which points to its values in the IA array.  And that time is always NC non-negative. XXGCON will flag points to be constrained by setting sign bit FC of time.  Sign bit is cleared before constraint tests to make tests C independent of spot.9C_CALLS   LIMIT, XXFVAL, IAND, IOR COMMONS XXCOM, XXGCOM.JC_History RMEHLMAN 82DEC29 ICOL made Int*2, ignore seq constraints 1/3/83.<C         1/07/83 Time column pointer from first ICON entry.C_END	<      INTEGER*2 XXFVAL,KPTIME, MZERO/-32768/, MAXPOS /32767/!-----Loop on lines in row.      DO 60 J=J1,J2F!-----Zero sign bit of time variable (since time reused for each spot)        KPTIME = IDCON(4,1).        IA(J,KPTIME)=IAND(IA(J,KPTIME),MAXPOS)        IF (NCON.EQ.0) GO TO 15A!-----Constraints, part 1: apply constraints to database columns.      DO 10 K=1,NCON        KPTR=IDCON(4,K)"        IF (KPTR.GT.1000) GO TO 10%        IF (ICOL(KPTR).LT.0) GO TO 10.        CALL LIMIT(IA(J,KPTR),IDCON(2,K),0,IR)        IF (IR.NE.0) GO TO 50 10   CONTINUE 15   IF (NFUN.EQ.0) GO TO 40!-----Evaluate functions.      DO 20 K=1 ,NFUN        KPTR = IFUN(1,K)        KFUN = IFUN(2,K)        IF (KFUN.EQ.0) GO TO 18!-----User function.:        IA(J,KPTR) = XXFVAL(KFUN,IFUN(3,K),IA(J,1),NLINES)        GO TO 20!-----Difference2 18   IA(J,KPTR) = IA(J,IFUN(3,K))-IA(J,IFUN(4,K)) 20   CONTINUE?!-----Constraints, part 2: apply constraints to user functions.      DO 30 K = 1,NCON        KPTR=IDCON(4,K)"        IF (KPTR.GT.1000) GO TO 30%        IF (ICOL(KPTR).GT.0) GO TO 30.        CALL LIMIT(IA(J,KPTR),IDCON(2,K),0,IR)        IF (IR.NE.0) GO TO 50 30   CONTINUE 40   IF (INT.LE.1) GO TO 60!-----Apply interval logic.      KINT = KINT + 1!      IF (KINT .LT. INT) GO TO 50      KINT=0      GO TO 604!-----Flag sign bit of time variable to reject line.. 50   IA(J ,KPTIME) = IOR(IA(J,KPTIME), MZERO)4!-----Flag sign bit of time variable to reject line. 60   CONTINUE!-----End loop on lines of row.      RETURN	      END