bugGNU Octave - Bugs: bug #60084, Clarify command syntax in...

 
 

bug #60084: Clarify command syntax in documentation

Submitter:  None
Submitted:  Sun 21 Feb 2021 06:20:59 AM UTC
   
 
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Dan Blake Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 6.2.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 20 Mar 2021 02:44:22 PM UTC, comment #3: 

I pushed a change of the documentation on stable here:
https://hg.savannah.gnu.org/hgweb/octave/rev/e4cfe348b212

Marking as ready for test.

Markus Mützel <mmuetzel>
Group administrator
Tue 23 Feb 2021 06:47:16 PM UTC, comment #2: 

Re-opening to clarify the documentation of the command syntax.

Markus Mützel <mmuetzel>
Group administrator
Sun 21 Feb 2021 10:17:46 AM UTC, comment #1: 

This is expected behavior. Calling `figure 6` is equivalent to `figure("6")`.
Using the command syntax might set the `ans` variable (if the command has an output argument). But it cannot be used in assignments.
Use the function syntax instead: `h = figure(7)`.

See also:
http://octave.org/doc/v6.1.0/Commands.html#Commands


Markus Mützel <mmuetzel>
Group administrator
Sun 21 Feb 2021 06:20:59 AM UTC, original submission:  


>> % The following three commands create figures 4, 5, and 6.
>> figure(4)
>> g=figure(5)
>> figure 6
>>
>> % However, this command throws an error.
>> h=figure 7

error: parse error:

  syntax error

>>> h=figure 7

             ^

>>

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

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    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.

     

    Follow 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-04-05 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2021-03-20 mmuetzel StatusConfirmed Ready For Test
    2021-02-24 rik5 Carbon-CopyRemoved 72865 -
    2021-02-24 rik5 Summaryh=figure n throws an error Clarify command syntax in documentation
    2021-02-23 mmuetzel CategoryOctave Function Documentation
        Item GroupUnexpected Error or Warning Documentation
        StatusInvalid / Not an Octave Bug Confirmed
        Open/ClosedClosed Open
        Release6.1.0 6.2.0
        Operating SystemGNU/Linux Any
    2021-02-21 mmuetzel StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code