octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #51191] help text of first function in an Octa


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #51191] help text of first function in an Octave program uses wrongly comment
Date: Tue, 6 Jun 2017 10:03:20 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

URL:
  <http://savannah.gnu.org/bugs/?51191>

                 Summary: help text of first function in an Octave program
uses wrongly comment
                 Project: GNU Octave
            Submitted by: carandraug
            Submitted on: Tue 06 Jun 2017 02:03:19 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

An Octave program can have multiple functions defined with their own help text
which help will be able to pick up.  However, it seems that the first function
help text is the first block comments which in the case of a program will be
the shebang line.  See:



$ cat > an-octave-script << END
> #!/usr/bin/env octave
>
> ## This is the help text of the foo function.
> function x = foo (y, z)
>    x = y+z;
> endfunction
> 
> ## This is the help text of the bar function.
> function x = bar (y, z)
>   x = y+z;
> endfunction
> END
address@hidden:~$ octave-cli -q
octave-cli:1> source ("an-octave-script")
octave-cli:2> help foo
'foo' is a command-line function

!/usr/bin/env octave

octave-cli:3> help bar
'bar' is a command-line function

 This is the help text of the bar function.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51191>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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