
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RLIB 3.0a Reference - <b>creating help</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Creating Help
You can create RHELP-based help systems a number of ways. One way is
to mark sections of your source code with unique help keys. For
instance, in your customer data entry screen, just before the READ
command, set a global (PUBLIC or STATIC) variable named rh_HelpKey to
"CUSTOMER ENTRY" (rh_HelpKey = "CUSTOMER ENTRY"). Do this throughout
your code building a list of help keys as you go along. Then collect
this list of help keys and write your help text source file with
specific help text for each unique help key. A handy way to collect
the list of help keys is with a text search or grep program, by
scanning all .PRG files for the text "rh_HelpKey = ".
The next step is to compile your help source file into a .HLP file
with RHC. The default filename extension assumed by RHC is .RHC so if
your source file is named MYAPP.RHC, you would compile this help
source file with the command: RHC myapp The .RHC file extension is
optional. If your help source file has an extension other than .RHC,
use the full filename on the command line such as RHC myapp.src. This
will compile and create a file named MYAPP.HLP. This is the runtime
help file which is ready to be queried with the RLIB RHELP API
functions. See the example that follows for a sample help display
function.
Function API Quick Reference
RH_HEADER() Retrieve the header from a RHELP compiled help file.
RH_LINES() Get the number of text lines within a help text block.
RH_TEXT() Extract help text from a compiled .HLP file.
RH_WIDTH() Get the maximum line width within a help text block.
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson