[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49006] doc-string of edit.m: command call can
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #49006] doc-string of edit.m: command call cannot assign return value to variable |
Date: |
Mon, 5 Sep 2016 09:07:15 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
URL:
<http://savannah.gnu.org/bugs/?49006>
Summary: doc-string of edit.m: command call cannot assign
return value to variable
Project: GNU Octave
Submitted by: None
Submitted on: Mon 05 Sep 2016 09:07:13 AM UTC
Category: Documentation
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Documentation
Status: None
Assigned to: None
Originator Name:
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 4.0.3
Operating System: Any
_______________________________________________________
Details:
>> help edit
-- Command: edit NAME
-- Command: edit FIELD VALUE
-- Command: VALUE = edit get FIELD
But the form of command call cannot assign its return value to variable:
>> edit get mode
ans = async
>> a = edit get mode
parse error:
syntax error
>>> a = edit get mode
^
In this case we have to use the form of function call:
>> a = edit('get','mode')
a = async
So the doc-string of edit.m should be:
>> help edit
-- Command: edit NAME
-- Command: edit FIELD VALUE
-- Command: VALUE = edit ("get", "FIELD")
(See also the doc-string of "prefdir" "load" "who" which are correct:
-- Command: DIR = prefdir
-- Command: S = load ("options", "file", "v1", "v2", ...)
-- Command: S = load ("file", "options", "v1", "v2", ...)
-- Command: C = who ("pattern", ...)
)
Possible solution:
--- /usr/share/octave/4.0.3/m/miscellaneous/edit.m
+++ edit.m
@@ -19,7 +19,7 @@
## -*- texinfo -*-
## @deftypefn {Command} {} edit @var{name}
## @deftypefnx {Command} {} edit @var{field} @var{value}
-## @deftypefnx {Command} address@hidden =} edit get @var{field}
+## @deftypefnx {Command} address@hidden =} edit ("get", "@var{field}")
## Edit the named function, or change editor settings.
##
## If @code{edit} is called with the name of a file or function as its
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49006>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #49006] doc-string of edit.m: command call cannot assign return value to variable,
anonymous <=