octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Writing 'help' functions as m-files


From: Søren Hauberg
Subject: Writing 'help' functions as m-files
Date: Thu, 27 Mar 2008 07:36:27 +0100

Yet Another mail from the "Brain Farting Department"... (YABF?)
  A couple of days ago I started wondering why the help system is
written in C++ rather then as a set of m-files. Since the help system is
only used interactively (i.e. not part of any "real" calculations), I
doubt that speed is the issue.
  I would think that if the following function were available it would
be fairly simple to write the help system as m-files:
  
"get_help_text": given a function name, return the corresponding (raw)
help text as a string.

This function would have to be written in C++ since it has to deal with
built-in functions and oct-files. But couldn't everything be written as
m-files if this function was available? And couldn't this simplify the
implementation a bit?

Let me just tell why I started to think about this. To build the
Octave-Forge web pages we have a bunch of scripts written in various
languages. One of the many things these scripts do is to extract help
texts from each function, such that we can generate a corresponding web
page. The fact that we have our own implementation of this extraction is
IMHO a bad thing, since it duplicates the implementation in the help
system. Things would be more simple if we had the above-mentioned
"get_help_string" function in Octave. Also, doesn't the 'munge-texi'
program in 'doc/interpreter' reimplement this functionality as well?

Søren




reply via email to

[Prev in Thread] Current Thread [Next in Thread]