integer function iskfj (qdummy,j,jmin,jmax,jdflt) C C C Copyright (C) Shell Research Ltd. 1983 C C C The copyright in this computer program and associated user C instructions contained in this document is the property of C Shell Research Ltd.. No guarantee is given or may be implied C as to the adequacy of the program or its suitability for any C particular purpose and no liability is accepted for any loss C or damage arising out of its use. C C C C Version: Y07.00 C C C Author: Ray Carpenter 13-Jul-83 C C Revised: Ray Carpenter 29-Feb-84 C C*********************************************************************** C C Function: C C Prints a user suppiled question and seeks an double precision C integer answer. C C Parameter inputs: C C qdummy - the user's question. Not referenced by this routine. C jmin - optional minimum value for input C jmax - optional maximum value for input C jdflt - optional default value for input C C C Global inputs: C C qmin - true if jmin supplied C qmax - true if jmax supplied C qdlft - true if jdflt supplied C qdsply - true is display is not required. C C Parameter outputs: C C j - the returned value c iskfj - the function value C C Global outputs: C C none C C Errors: C C None C C*********************************************************************** C C Code begins :- C C implicit logical*1 (q) C implicit integer*4 (j) C common /askcom/ 1 iparam !parameter word used by some routines 2,ipoint !output terminal buffer pointer 3,iplen !prompt length 4,qlin(82) !terminal I/O buffer 5,qmin !set if user supplied minimum value 6,qmax !set if user supplied maximum value 7,qdflt !set if user supplied default 8,qctrlz !set if ^Z is invalid 9,qclc !set if lower to upper case conversion reqd. 1,qdsply !set if no display of current fields reqd. 2,qspc !set if special characters valid. 3,qvtmd !set if user wants video mode 4,qprmpt(3) !prompt character (default is '?') 5,qs(12) !temporary string storage C C if((.not. qmin) .or. (.not. qmax)) goto 5 C if (jmin .le. jmax) goto 5 C qmin = .false. qmax = .false. C 5 if (qdsply) goto 40 C call askfpb(2,' [') C call askfpb(1,'J') C if(qmin .eq. .false. .and. qmax .eq. .false.) goto 20 C call askfpb(3,' R:') C if (qmin .eq. .false.) goto 10 C call askfnj(jmin) C 10 call askfpb(1,':') C if( qmax .eq. .false.) goto 20 C call askfnj(jmax) C 20 if (.not. qdflt) goto 30 C call askfpb(3,' D:') C call askfnj(jdflt) C 30 call askfpb(1,']') C 40 call asktto C 50 call asktti C if (ipoint) 999,100,110 C 100 if(qdflt) j=jdflt goto 999 C 110 call errset(64,,,,.false.,) C decode(ipoint,121,qlin,err=150) j 121 format(i11) goto 200 C 150 ipoint = -1 goto 900 C C 200 if (qmin .eq. .false. ) goto 210 if (j .ge. jmin) goto 210 ipoint = -2 goto 900 C C 210 if(qmax .eq. .false.) goto 300 if( j .le. jmax) goto 300 ipoint = -2 goto 900 C 300 call errset(64,,,,.true.,) goto 999 c c 900 if(qvtmd) goto 999 c call askerr(ipoint) c goto 50 c C 999 iskfj = ipoint c return C C end