next up previous
Next: String handling
Up: Subprograms
Previous: Supported interfaces

Templates

SUBROUTINE HLP_NAMETR(KMD,INSTR,OUTSTR,JSTAT)

This implementation of the user-supplied name translation routine is suitable for use in a multiple-platform environment. It forms each filename by sandwiching the library name within a prefix and a suffix. HLP_NAMETR, or a user-supplied equivalent, is called by the HLP system prior to opening any help library, always with KMD=0. The library name to be translated is supplied in INSTR, and the filename is returned in OUTSTR ready for use in a Fortran OPEN statement. See Section 4.4 for further details of the HLP_NAMETR routine supplied, which uses other KMD values to set and enquire the prefix and suffix strings.

INTEGER FUNCTION HLP_INSUB(STRING,PROMPT,L)

This is a simple example of the user-supplied input routine which is to be called by the HLP_HELP routine each time an interactive response is required. STRING is the response received. PROMPT is the prompt string, output before STRING is solicited. L is the length of STRING, excluding any trailing spaces. The function returns the value +1 to indicate success. Note that the order of the arguments does not comply with Starlink standards (see SGP/16), a consequence of maintaining a family-resemblance with VMS Help. See Section 4.3. As well as being a template, HLP_INSUB is used in the LSTHLP and TSTHLP programs.

INTEGER FUNCTION HLP_OUTSUB(STRING)

This is a simple example of the user-supplied output routine which is to be called by the HLP_HELP routine each time a line of help text is to be output. STRING is the string to be output. The function returns the value +1 to indicate success. See Section 4.2. As well as being a template, HLP_OUTSUB is called in the LSTHLP and TSTHLP programs.



next up previous
Next: String handling
Up: Subprograms
Previous: Supported interfaces



HLP --- Interactive Help System
Starlink User Note 124
P. T. Wallace
13th June 1995
E-mail:ptw@star.rl.ac.uk