Trailing-Edge - PDP-10 Archives - decuslib20-03 - decus/20-0078/libsim/sqhelp.hlp
There are no other files named sqhelp.hlp in the archive.

SQHELP is an external  procedure  to  be  used  by  SIMULA  applications
programs  to  provide  a  conversational help facility.  SQHELP reads an
ordinary sequential .HLP file  and  presents  it  to  the  user  at  the
conversational terminal.

By giving a search word as input to SQHELP, SQHELP is directed  to  list
only those lines in the .HLP file which either contain this search word,
or are close to a line containing this search word.

The search word can either be input by the user himself at the terminal,
or  it  can  be given in the applications program, e.g. to get different
help messages in different program contexts.

You declare SQHELP in your program as

Description of the parameters to SQHELP:

BOOLEAN PROCEDURE sqhelp(helpfile,selector,height,width);
VALUE helpfile, selector;
TEXT helpfile, selector; INTEGER height, width;

HELPFILE is a text containing a file specification.  If no extension  is
given,  .HLP is assumed.  First SQHELP will try to find the file in your
own area.  If not there, SQHELP will search for the file  on  the  HLP:,
DOC: and SYS: areas (in this order) on your computer.

SELECTOR is a search word.  Only lines surrounding lines containing this
search  word  will be displayed to the user.  If SELECTOR is NOTEXT, the
user will be asked to provide a search word.  If  he  does  not  provide
any, the whole help file will be displayed to him.

HEIGHT is the number of lines in each chunk of text which will be  shown
to  the  user.  If a page (segment of input file between succeeding form
feed characters) is longer than this, it will be  divided  into  smaller
chunks.   After  each  chunk,  the  user  will  be  given  the option to
discontinue typing of the help file.  If pages contain more than  HEIGHT
lines,  then  only  lines  less than HEIGHT/2 lines above or below lines
containing the search word will be displayed to the user.

With display terminals, HEIGHT should be one less  than  the  number  of
lines on the screen.

WIDTH, the line length, must be at least as long as the longest line  in
the help file, otherwise you may get an error interrupt.

Example of use (assuming that you are using SAFEIO):

     request("Enter speed",nodefault,realinput(x,TRUE),"",

This example means that if the user types ? on his terminal,
sqhelp will search for pages containing the word SPEED
in the file RACE.HLP.

The following EXTERNAL declarations are necessary in programs
using SQHELP:

     EXTERNAL TEXT PROCEDURE conc, rest, scanto, from, upcase;
     EXTERNAL REF (infile) PROCEDURE findinfile;
     EXTERNAL BOOLEAN PROCEDURE dotypeout, sqhelp;

                          [END OF SQHELP.HLP]