Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-06 - 43,50415/sqhelp.rnh
There are 4 other files named sqhelp.rnh in the archive. Click here to see a list.
.center
SQHELP
.center
======
.skip 2
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.
.skip
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.
.skip
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.
.skip
You declare SQHELP in your program as
.break
EXTERNAL BOOLEAN PROCEDURE SQHELP;
.skip
Description of the parameters to SQHELP:
.skip
.nofill
BOOLEAN PROCEDURE sqhelp(helpfile,selector,height,width);
VALUE helpfile, selector;
TEXT helpfile, selector; INTEGER height, width;
.skip
.fill
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.
.skip
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.
.skip
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.
.skip
With display terminals, HEIGHT should be one less than the number
of lines on the screen.
.skip
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.
.skip
.nofill
Example of use (assuming that you are using SAFEIO):
.skip;.left margin 5
request("Enter speed",nodefault,realinput(x,TRUE),"",
sqhelp("Racing","Speed",19,80));
.left margin 0;.skip
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.
.skip
The following EXTERNAL declarations are necessary in programs
using SQHELP:
.left margin 5;.nofill;.skip
EXTERNAL TEXT PROCEDURE conc, rest, scanto, from, upcase;
EXTERNAL REF (infile) PROCEDURE findinfile;
EXTERNAL BOOLEAN PROCEDURE dotypeout, sqhelp;
EXTERNAL INTEGER PROCEDURE search;
.left margin 0;.skip;.center
[END OF SQHELP.HLP]