subroutine askerr (icode) 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 28-Apr-82 C C Revised: Ray Carpenter 29-Feb-84 C C*********************************************************************** C C Function: C C Prints error messages C C Parameter inputs: C C icode - the error message number (-1 -> -5) C C Global inputs: C C None C C Parameter outputs: C C None C C Global outputs: C C none C C Errors: C C None C C*********************************************************************** C C Code begins :- C C implicit byte (q) C 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 are valid 3,qvtmd !set if user wants video mode 4,qprmpt(3) !prompt character (default is '?') 5,qs(12) !temporary string storage C C mxask=5 C c*********************************************************************** C C Remember that ICODE is often IPOINT really. Do NOT change the c order of the next two statements !!! c jcode=(-1*icode)+1 c d type *,icode,jcode C ipoint=0 c c*********************************************************************** C if(jcode .gt. mxask+1 .or. jcode .lt. 1) jcode=1 C if(qvtmd) goto 20 c call askfpb(1,"15) call askfpb(1,"12) c if(jcode .eq. 5) call askfpb(1,"12) c 20 call askfpb(-1,'?ASK-F-') c goto (100,200,300,400,500,600) jcode C 100 call askfpb(-1,'ASK Failure.') goto 1000 C 200 call askfpb(-1,'Invalid input.') goto 1000 C 300 call askfpb(-1,'Input not in range.') goto 1000 C 400 call askfpb(-1,'String length not in range.') goto 1000 C 500 call askfpb(-1,'Task exiting due to ^Z input.') goto 1000 C 600 call askfpb(-1,'No default defined.') goto 1000 C 1000 if(jcode .eq. 5) goto 2000 call askfpb(-1,' Please try again.') 2000 call asktto C 9999 return C C end