[Top][All Lists]

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

Re: a help problem

From: Vic Norton
Subject: Re: a help problem
Date: Mon, 28 Nov 2016 19:49:43 -0500

Thanks for the feedback, guys.

I could make the script a function, but that would defeat my purpose. I am 
trying to create scripts that will illustrate the use of a package I have 
created. A user will typically need a description of what a particular 
illustrative script does. If I have to turn a script into a function just to 
have it call another lookup function, this will defeat the whole purpose of 
what I am trying to do.



> On Nov 28, 2016, at 4:56 PM, Juan Pablo Carbajal <address@hidden> wrote:
> On Mon, Nov 28, 2016 at 7:57 PM, Mike Miller <address@hidden> wrote:
>> 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.
>> --
>> mike
>> _______________________________________________
>> Help-octave mailing list
>> address@hidden
> scripts can be documented just as function files
> I asked this same question some time ago (this year) but I am failing
> to find jwe answer to it.

reply via email to

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