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: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: InvalidAssigned to: None
Originator Name: GodfreyOpen/Closed: Closed
Release: devOperating 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by godfrey (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 31 Oct 2016 11:02:04 PM UTCmtmillerStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1