bugGNU Octave - Bugs: bug #54765, space between function name and...

 
 

bug #54765: space between function name and opening parenthesis causes havoc for expression inside brackets

Submitter:  Felipe G. Nievinski <fgnievinski>
Submitted:  Tue 02 Oct 2018 02:37:27 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.4.1 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 02 Oct 2018 05:48:12 AM UTC, comment #2: 

thanks for the clarification. 

a student had raised this oddity and I presumed it was a bug.

I confirm this is not even a matlab incompability.

sorry for the false alarm.

Felipe G. Nievinski <fgnievinski>
Tue 02 Oct 2018 05:04:55 AM UTC, comment #1: 

Thanks for your bug report. But this is not a bug, this is the correct operation of the square bracket syntax for array concatenation in Octave and Matlab.

Spaces are significant inside of square brackets in the Octave language. The syntax


[sin (0)]


is equivalent to


[sin(), 0]


You can read more about this in the Octave user manual at http://octave.org/doc/interpreter/Matrices.html. In fact, an example showing a call to the sin function is used to illustrate how the syntax is parsed.

Mike Miller <mtmiller>
Group Member
Tue 02 Oct 2018 02:37:27 AM UTC, original submission:  

this doesn't work: [sin (0)]
this works: [sin(0)], sin(0), sin (0)
sin can be replaced for any function name.

Felipe G. Nievinski <fgnievinski>

 

(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 fgnievinski (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-10-02 mtmiller StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code