[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #57361] wish: warning about function name and
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #57361] wish: warning about function name and filename disagreement: point to a fix |
Date: |
Thu, 5 Dec 2019 01:50:59 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 |
URL:
<https://savannah.gnu.org/bugs/?57361>
Summary: wish: warning about function name and filename
disagreement: point to a fix
Project: GNU Octave
Submitted by: None
Submitted on: 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:
Open/Closed: Open
Discussion Lock: Any
Release: 5.1.0
Operating System: GNU/Linux
_______________________________________________________
Details:
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>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57361>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #57361] wish: warning about function name and filename disagreement: point to a fix,
anonymous <=