[Top][All Lists]

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

Re: a help problem

From: Mike Miller
Subject: Re: a help problem
Date: Mon, 28 Nov 2016 10:57:17 -0800
User-agent: NeoMutt/20161104 (1.7.1)

On Mon, Nov 28, 2016 at 07:30:03 -0500, Vic Norton wrote:
> I am running Homebrew Octave 4.2.0 on an iMac OS X 10.12.1. Everything
> works perfectly except this curious test script.
> Why do I only get the help-description of the script when I comment out
> the x2y function? Something very strange is going on here.
> How do I create a lookup function without destroying the functionality
> of the leading help-description of my script?
> Any suggestions would be much appreciated.

I don't have an answer to how to get this to work, but this is probably
because the `help` function is primarily intended for use with function
files, not scripts.

I have not looked into how the help text is parsed in detail, but based
on your example script I would guess that even though the test1.m file
is a script, the help functions parse the file looking for a function
definition if one exists, and attempt to show a doc string associated
with that function.

If you think it would be useful to improve Octave to show help strings
for scripts that incidentally contain function definitions, we should
probably take this to the bug tracker.


reply via email to

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