12 character hlptxt*132,line*80, cat1*30, cat2*30, hlpcat*30
13 integer ioerr,ibar,iblk,lth1,lth2,nlines,LINES
14 logical found1,found2,kywrd1,kywrd2,match1,noncmd
17 call gettkn( line, cat1, lth1 )
18 call gettkn( line, cat2, lth2 )
19 if (lth1.ne.0)
call touppr(cat1,lth1)
20 if (lth2.ne.0)
call touppr(cat2,lth2)
21 open (
ludisk,file=
'/home/daveb/bin/nlshlp.txt',
22 # status=
'old',access=
'sequential',iostat=ioerr)
34 1
read (
ludisk,
'(a)',end=4,iostat=ioerr) hlptxt
36 write (
luttyo,1003) hlpcat(:ibar),hlptxt(:iblk)
41 2
if (hlptxt(ibar:ibar).ne.
'|'.and.ibar.lt.132)
then
46 kywrd1=hlptxt(1:1).eq.
'*'
47 kywrd2=hlptxt(1:1).eq.
'>'
48 noncmd=hlptxt(1:1).eq.
' '
49 hlpcat=hlptxt(2:ibar-1)
50 hlptxt=hlptxt(ibar+1:)
56 3
if (hlptxt(iblk:iblk).eq.
' ')
then
68 write(
luttyo,1000) hlpcat(:ibar),hlptxt(:iblk)
69 else if (cat1(:lth1).eq.hlpcat(:lth1))
then
71 write(
luttyo,1000) hlpcat(:ibar),hlptxt(:iblk)
80 if (match1.and.lth2.eq.0)
then
82 write(
luttyo,1004) hlpcat(:ibar),hlptxt(:iblk)
83 else if (match1.and.cat2(:lth2).eq.hlpcat(:lth2))
then
85 write(
luttyo,1004) hlpcat(:ibar),hlptxt(:iblk)
89 else if (noncmd .and. lth1.ne.0)
then
90 if (cat1(:lth1).eq.hlpcat(:lth1))
then
92 write(
luttyo,1000) hlpcat(:ibar),hlptxt(:iblk)
98 4
if ((lth1.ne.0 .and. .not.found1) .or.
99 # (lth2.ne.0 .and. .not.found2))
100 #
write (
luttyo,1001) cat1(:lth1),cat2(:lth2)
106 1001
format(
'*** No help available for ''',a,
' ',a,
''' ***')
107 1002
format(
'*** File ''nlshlp.txt'' not available ***')
108 1003
format(
'*** Error reading file ''nlshlp.txt'' ***')
109 1004
format(2x,a,t24,a)
113 subroutine linchk( nlines )
118 integer nlines,MXLINES
120 parameter(mxlines=20)
123 if (nlines.eq.0)
write (
luttyo,1001)
125 if (nlines.gt.mxlines)
then
131 1000
format(
'...press <RETURN> to continue...')
132 1001
format(/15x,
' *** NLSL on-line help ***'/)
subroutine linchk(nlines)
subroutine touppr(string, lth)
subroutine gettkn(line, token, lth)
Written for free-form input of parameters for slow-motional calculations. Returns a token consisting ...
integer, parameter ludisk
integer, parameter luttyo