Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RLIB 3.0a Reference - <b>function:</b> rh_lines() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function:    RH_LINES()

Purpose:     Get the number of text lines within a help text block

Syntax:      RH_LINES( rhelpfile, help_key )

Arguments:   rhelpfile   - This parameter may be either the rhelp compiled
                           filename, or the numeric file handle returned
                           from a previous call to FOPEN() to open the
                           help file.

             help_key    - Character value indicating the text associated
                           as the key for the desired help.  This text can
                           any length but only the first 16 characters are
                           significant.  Case is insensitive.

Returns:     Numeric line count in the associated help text block.  If the
             specified help key is not found, or an error occurs, zero is
             returned.

Description: This function reads and returns the number of lines within a
             block of help text associated with the help key, from a help
             file that was compiled with the Rhelp compiler.  Knowing this
             line count allows you to tailor the help display window size
             to the size of the text.

             The help key is a unique character string which is
             significant to the first 16 characters, that identifies an
             entry in the Rhelp compiled help file.  This allows help
             systems to be queried by supplying a descriptive character
             string.

             See Appendix C entitled The RHELP Compiler for more detailed
             information and examples.

Notes:       If the helpfile parameter is supplied as a character string,
             it is deemed to be the name of the Rhelp file.  In this case
             the help file is opened (using FOPEN()), the header is then
             extracted, the help file closed, and the header returned.  If
             the FOPEN() fails, a null is returned, and RLIBERROR() set.

             If the helpfile parameter is supplied as a numeric value, it
             is deemed to be the numeric file handle returned by
             previously FOPEN()ing the help file.  In this case, the text
             is read and returned, but the file is not closed.  This
             feature allows you the flexibility of leaving the help file
             open during the course of your application, therefore
             speeding up access by not having to constantly open and close
             the help file.  This method of access is not recommended if
             you are short on file handles or you are not comfortable with
             low level file operations.  If you use this method, always
             remember to FCLOSE() your files.

             The help file pointer position is left unchanged.

Example:     helpLines = RH_LINES("myapp.hlp", "MENU HELP" )

             *-- or

             helpHandle = FOPEN("myapp.hlp")
             helpLines  = RH_LINES( helpHandle, "MENU HELP" )

Source:      RL_RHELP.PRG

See also:    RH_HEADER(), RH_TEXT(), RH_WIDTH()

See Also: RH_HEADER() RH_TEXT() RH_WIDTH()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson