c SAYx routines put parameters at screen locations, for display, c not for editing. Used for labels and headings, etc. subroutine SayC(jx,jy,string) c Character string starting at column JX, Row JY c Called by SAYB, SAYCD, SAYI, SAYJ, SAYF include 'SCRLIB.INC' character*82 string integer*2 jx,jy call errset(55,.true.,.false.,.true.,.false.,) !'O/P Convsn Error' call goXY(jx,jy) lngth=length(string) if(.not.revers)then type 1000,string(1:lngth) 1000 format('+',A,$) else type 1010,esc,string(1:lngth),esc 1010 format('+',A,'[1;4m',A,A,'[0m',$) !Bold underscore revers=.false. endif return end subroutine SayCD(jx,jy,text,ll) c This version of SAYC is for character variables without imbedded '|' c Maximum length is LL, <80 include 'SCRLIB.INC' character*82 text character*82 string call scopy(text,string,ll) string(81:81)=null(1:1) string(82:82)=null(1:1) call trim(string) call strpad(string,ll) string(ll+1:ll+1)='|' call sayC(jx,jy,string) return end subroutine SayB(jx,jy,B,fmt) c Single BYTE display, passed as BYTE or I*2 c Note that fmt will be ignored and c treated as '(O3)'. It is here for compatibility with others. character*8 fmt integer*2 jx,jy integer*2 B !Conflict with caller is permitted character*4 form data form/'(O3)'/ integer*4 J J=B !Convert I*1 to I*4 J=J.and."377 call SayJ(jx,jy,J,form) return end subroutine SayI(jx,jy,I,fmt) c Display INTEGER*2 according to passed format string fmt c Note that fmt MUST be of the form '(In)' or '(Inn)' character*8 fmt integer*2 jx,jy integer*2 I integer*4 J J=I !Convert I*2 to I*4 c J=J.and."177777 !No way!!!! call SayJ(jx,jy,J,fmt) return end subroutine SayJ(jx,jy,n,fmt) c Display INTEGER*4 according to passed format string fmt c Note that fmt MUST be of the form '(fn)' or '(fnn)' c where f can be I, O or Z include 'SCRLIB.INC' character*8 fmt character*10 ffmt data ffmt/'(I12,''|'')'/ common /CONFN/string character*42 string integer*2 jx,jy integer*4 n call errset(55,.true.,.false.,.true.,.false.,) !'O/P Convsn Error' c Set up the appropriate format lngth=index(fmt,')') if(lngth.eq.4)then ffmt(2:2)=' ' ffmt(3:4)=fmt(2:3) !( fn) elseif(lngth.eq.5)then ffmt(2:4)=fmt(2:4) !(fnn) else call GoXY(1,24) type 1000,bell 1000 format('+',A,'SAYJ-F-Invalid Format',$) call exit() endif c Now paint the string write(string,ffmt,err=20,end=20) n 10 call sayC(jx,jy,string) return 20 call goXY(1,24) type 1010,n,ffmt 1010 format('+','SAYJ-F-Error in write to string ',I14,2x,A,$) string='*|' goto 10 end subroutine SayF(jx,jy,f,fmt) c Display REAL*4 according to passed format string fmt c Note that fmt MUST be of the form '(Fn.n)' or '(Fnn.n)' include 'SCRLIB.INC' character*10 fmt character*12 ffmt data ffmt/'(F10.2,''|'')'/ common /CONFN/string character*42 string real*4 f call errset(55,.true.,.false.,.true.,.false.,) !'O/P Convsn Error' c Set up the appropriate format lngth=index(fmt,')') if(lngth.eq.6)then ffmt(2:2)=' ' ffmt(3:6)=fmt(2:5) elseif(lngth.eq.7)then ffmt(2:6)=fmt(2:6) else call GoXY(1,24) type 1000,bell 1000 format('+',A,'SAYF-F-Invalid Format',$) call exit() endif c Now paint the string write(string,ffmt,err=10,end=10) f call sayC(jx,jy,string) return 10 call goXY(1,24) type 1010,f,ffmt 1010 format(x,'SAYF-F-Error in write to string',F14.4,2x,A,$) call exit() end