integer function iskfs(qdummy,qout,imin,imax) 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 22-Mar-83 C C Revised: Ray Carpenter 29-Feb-84 C C*********************************************************************** C C Function: C C Prints a question and solicts a string response. C C Parameter inputs: C C qdummy - the user's question. Not referenced by this module. C imin - optional minimum string length C imax - optional maximum string length C C Global inputs: C C qmin - true if min. length supplied C qmax - true if max. length supplied C qdsply - true if display not required C C Parameter outputs: C C qout - the output string c isks - function output C C Global outputs: C C iparam - set to 1 (=decimal output) C C Errors: C C None C C*********************************************************************** C C Code begins :- C C implicit logical*1 (q) 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 if spceial 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 dimension qout(1) C if (.not. qmax) goto 3 C if(imax .gt. 80 .or. imax .lt. 0) qmax=.false. C 3 if (.not. qmin) goto 5 C if(imin .gt. 80) qmin=.false. C if (imin .le. imax) goto 5 C qmin = .false. qmax = .false. C 5 if(qdsply) goto 30 C call askfpb(4,' [S ') C if((.not. qmin) .and. (.not. qmax) ) goto 20 C call askfpb(2,'R:') C if(.not. qmin ) goto 10 C iparam=1 C call askfni(imin) C 10 call askfpb(1,':') C if( .not. qmax ) goto 20 C call askfni(imax) C 20 call askfpb(1,']') C 30 call asktto c qdflt =.true. c 100 call asktti C if(qspc .and. (ipoint .le. 0)) goto 999 c if( .not. qmin) goto 110 if(ipoint .ge. imin) goto 110 C ipoint = -3 goto 900 C 110 if( .not. qmax) goto 120 if(ipoint .le. imax) goto 120 C ipoint = -3 goto 900 C 120 do 130 i=1,ipoint+1 C qout(i)=qlin(i) C 130 continue C goto 999 c c 900 if(qvtmd) goto 999 c call askerr(ipoint) c goto 100 c 999 iskfs=ipoint C return C end