bugGNU Octave - Bugs: bug #52314, end in a matrix experession...

 
 

bug #52314: end in a matrix experession interpreted as endfunction

Submitted by:  None
Submitted on:  Tue 31 Oct 2017 10:01:56 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: InvalidAssigned to: None
Originator Name: Garry GeladeOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.2.1
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 31 Oct 2017 10:24:16 AM UTC, comment #1:

The syntax error is the result of a missing closing bracket in line 5 of your example script. To my opinion, also the highlighting is correct since "end" is a keyword, too, when interpreted as largest index of an array.

I am closing this report.

Torsten <ttl>
Project Member
Tue 31 Oct 2017 10:01:56 AM UTC, original submission:

Using Windows 10, 64 bit

Expressions such as C= A(:2:end) are misinterpreted. Octave sees the end keyword as end of function and highlights it in blue.

The expression is not evaluated and the script terminates at this point as follows

parse error near line 6 of file endbug.m
syntax error

>>> C = A(:, 2:end)

^

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #42306:  endbug.m added by None (159B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ttl (Posted a comment)
  • -unavailable- added by None (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 31 Oct 2017 10:24:16 AM UTCttlStatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Tue 31 Oct 2017 10:01:56 AM UTCNoneAttached File-=>Added endbug.m, #42306

    Back to the top


    Powered by Savane 3.1-cleanup1