bugGNU Octave - Bugs: bug #49496, syntax error

 
 

bug #49496: syntax error

Submitted by:  Michael Godfrey <godfrey>
Submitted on:  Mon 31 Oct 2016 10:54:52 PM UTC  
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Invalid Assigned to:  None
Originator Name:  Godfrey Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 01 Nov 2016 02:42:39 PM UTC, comment #3:

Final comment: last night I was working on getting work
done, not thinking about Octave syntax. Now I realize that
the [min (di), max (di)] error came about due to an
overzealous script which applied the rule that a blank
should appear between function name and (.

Sorry about the confusion.

Michael Godfrey <godfrey>
Project Member
Mon 31 Oct 2016 11:25:28 PM UTC, comment #2:

You are right.

I am not sure how long ago it was that this worked,
but I am pretty sure that it did. I was running some
quite old code.

However, it also does not work in Matlab.
Matlab's diagnostic is a bit more informative:

[min (di), max (di)]
Error using min
Not enough input arguments.
=================================

Anyhow, best to close the bug report.

Michael Godfrey <godfrey>
Project Member
Mon 31 Oct 2016 11:02:04 PM UTC, comment #1:

This is not a bug, this is the usual confusion about spaces within an array literal.

When you create an array, any whitespace is treated as a separator between elements. Your example

This can't be fixed, you just have to remember to omit spaces when calling a function inside of an array context like this, or surround the entire thing with parentheses

Mike Miller <mtmiller>
Project Administrator
Mon 31 Oct 2016 10:54:52 PM UTC, original submission:

Would be good to check if this error exists in current stable

Michael Godfrey <godfrey>
Project Member

 

(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 mtmiller (Posted a comment)
  • -email is unavailable- added by godfrey (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-10-31 mtmiller StatusNone => Invalid
        Open/ClosedOpen => Closed

    Back to the top


    Powered by Savane 3.4