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

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

[Octave-bug-tracker] [bug #63782] "help myfunc" issues a warning if myfu


From: Hartmut
Subject: [Octave-bug-tracker] [bug #63782] "help myfunc" issues a warning if myfunc code has a problem
Date: Fri, 10 Feb 2023 07:52:25 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?63782>

                 Summary: "help myfunc" issues a warning if myfunc code has a
problem
                 Project: GNU Octave
               Submitter: hardy
               Submitted: Fri 10 Feb 2023 12:52:23 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: stable
         Discussion Lock: Any
        Operating System: Any
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Fri 10 Feb 2023 12:52:23 PM UTC By: Hartmut <hardy>
This behavior does not seem to be new, but it came as an unexpected suprprise
to me, and I am not sure if it is intended behavior.

Here is how to reproduce the behavior:
1. generate a function m-file that as a code "problem" inside, e.g. this one:

## This is my doc string.
function myfunc
  if (1==1)
    disp ("hello")
  elseif
    a = 1
  endif

2. save this function m-file under the corresponding filename, in this example
myfunc.m
3. change the current folder to this file's folder.
4. now call "help" to display the help string of this m-file function.

observed result: (with any current Octave version like 8.0.90, 7.3.0, 6.4.0,
..., 4.2.2)

>> help myfunc
warning: suggest parenthesis around assignment used as truth value near line
6, column 7 in file 'C:\...\myfunc.m'
warning: called from
    help at line 103 column 20
[...]


This warning is very true in itself. I was just suprised that the "help"
function displays it. There is no problem with the help string of this
function, so shouldn't the help function just output this help string without
any complaint?

Calling "help myfunc" afterwards for a second time, does NOT produce this
warning any more.

Is this intended behavior? Or do we want to change this?







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63782>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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