bugGNU Octave - Bugs: bug #38704, Incorrect braindead short...

 
 

bug #38704: Incorrect braindead short circuiting in m-files

Submitted by:  None
Submitted on:  Wed 10 Apr 2013 07:42:54 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Matthias FuchsOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.3
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.

 

Thu 11 Apr 2013 05:53:47 AM UTC, comment #5:

I checked in the following change:

http://hg.savannah.gnu.org/hgweb/octave/rev/f441dc7d1afd

John W. Eaton <jwe>
Project Administrator
Wed 10 Apr 2013 08:11:20 PM UTC, comment #4:

Ah, now I can reproduce that, thanks.

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Wed 10 Apr 2013 08:08:32 PM UTC, comment #3:

It works when each of the lines in the example are entered in the interpreter. However, I still get an error in the second case if the example is saved as an .m file and the .m file is called from the interpreter.

Anonymous
Wed 10 Apr 2013 07:55:56 PM UTC, comment #2:

Hmm, it works for me with 3.6.3:

John W. Eaton <jwe>
Project Administrator
Wed 10 Apr 2013 07:50:06 PM UTC, comment #1:

I can't reproduce this at 3.6.3. Are you sure this what you're seeing? Both work for me here.

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Wed 10 Apr 2013 07:42:54 PM UTC, original submission:

I ran the following script with the octave interpreter and observed that the first if-expression is interpreted without error while the second one fails:

In other words, it seems that in the latter case not only the first but also the second expression is evaluated which results in an error (index out of bounds). Unfortunately, I do not have access to Matlab so I do not know if this behavior is the same there.

Anonymous

 

(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 rik5 (Updated the item)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by jordigh (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 11 Apr 2013 01:45:47 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Wed 10 Apr 2013 08:11:20 PM UTCjordighStatusWorks For Me=>Confirmed
      SummaryInconsistent short-circuit behavior=>Incorrect braindead short circuiting in m-files
    Wed 10 Apr 2013 07:50:06 PM UTCjordighStatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1