bugGNU Octave - Bugs: bug #57361, wish: warning about function name...

 
 

bug #57361: wish: warning about function name and filename disagreement: point to a fix

Submitter:  None
Submitted:  Thu 05 Dec 2019 06:50:57 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  None Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * 5.1.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 05 Dec 2019 06:50:57 AM UTC, original submission:  

Per the docs ยง 11.10 "Script Files", a script file differs from a function file in that it does not start with the word "function". The solution provided there is to start the file with another token, e.g. 1.

The interpreter warns when "function name does not agree with function filename". That's correct, and it would be handy for a newbie to the language if the message could point to the docs or mention how to fix the warning.

(An example of an Octave user that does not know the language could be e.g. a student that must learn matlab for a course, but does not want to give root to the installer on their Debian.)


For example, have a file with this content:


function f
endfunction


Run it:


octave:1> run("/path/to/reproducer.m");
warning: function name 'f' does not agree with function filename '/path/to/bug_reproducer_2.m'
octave:2>



Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only group members can vote.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-02a9.
Corresponding source code