
  store "              " to oldpattern
  store "              " to newpattern

  *next routines will highlight string in the display
  store subject to string
  store mtext to oldpattern
  store (chr(27)+chr(40)+mtext+chr(27)+chr(41)) to newpattern
  do fog-stng
  do fog-rplc

  release oldpattern,newpattern, endstring, character, firstchar
  release lastchar,nextchar,empty,isblank,isnumber,cpointer
  release isupper,islower,makelower,makeupper,capfirst,startstr,addchar
  release string,isendsent,position
  store newstring to string
  if ntext <> " "
   store "              " to oldpattern
   store "              " to newpattern
   store ntext to oldpattern
   store (chr(27)+chr(40)+ntext+chr(27)+chr(41)) to newpattern
   do fog-stng
   do fog-rplc
   release oldpattern,newpattern, endstring, character, firstchar
   release lastchar,nextchar,empty,isblank,isnumber,cpointer
   release isupper,islower,makelower,makeupper,capfirst,startstr,addchar
   release string,isendsent, position
   endif

*when found store and display in format
if !(print) = "P"
set format to print
endif
 STORE $(newstring,1,79) TO PRT1
 @ LINE, COUNT SAY PRT1 USING "X;
XXXXXXXXX;
XXXXXXXXXX;
XXXXXXXXXX;
XXXXXXXXXX;
XXXXXXXXXX;
XXXXXXXXXX;
XXXXXXXXXX;
XXXXXXXXX"
	STORE $(newstring,80) TO PRT2
	@ LINE +1, COUNT SAY PRT2 USING "X;
XXXXXXXXX;
XXXXXXXXXX;
XXXXXXXXXX;
XXXXXXXXXX;
XXXXXXXXXX;
XXXXXXXXXX;
XXXXXXXXXX;
XXXXXXXXX"

*also display magazine, date, page and for editing purposes record number
 @ line +2, 0 say magazine
 @ line +2, 16 say date
 @ line +2, 25 say page
 @ line +2, 45 say "Record No."
 @ line +2, 56 say #

 set inten off
@ LINE + 3,0 SAY "----------------------------------------------------------;
----------------------"
 set inten on
 RELEASE PRT1,PRT2
 *move line counter ahead for next display
 STORE LINE + 5 TO LINE
 set format to screen
endif
if !(print) <> "P"
*if line > 19 full screen prepare new screen and restart counters 
	IF LINE > 19
	   ? "Press any key to continue; Escape to completely stop"  		
           set console off
           WAIT
	   set console on	
	   STORE 1 TO LINE
  	   ERASE
	 ENDIF
else
  if line > 55
    ?
    store 5 to line
 endif
