bugGNU Octave - Bugs: bug #49743, Two-input version of `eval` fails...

 
 

bug #49743: Two-input version of `eval` fails for certain inputs

Submitted by:  Luis Mendo <lmendo>
Submitted on:  Wed 30 Nov 2016 03:12:22 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Luis MendoOpen/Closed: Closed
Release: 4.0.0Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 30 Nov 2016 05:25:10 PM UTC, comment #1:

I can confirm that it fails as described in Octave 4.0.3 as well.
However, it works as expected in Octave 4.2.0.
As far as I know, there won't be any more bug fix releases to Octave 4.0. Please, consider updating to the newest release.

Closing as fixed.

Markus Mützel <mmuetzel>
Project Member
Wed 30 Nov 2016 03:12:22 PM UTC, original submission:

The two-input version of `eval` seems to be buggy. Try for example:

That string should give an error when eval'ed, which should be caught. But that's not the case: the above does nothing (no error, no displaying `Wrong input` as it should). In fact, it seems to do worse than nothing: subsequent statements are ignored. Try for example

The explicit version does work:

correctly displays `Wrong input` and then `Next statement`.

This bug happens in Octave 4.0.0, at least on Windows 7 and on Linux (tested on https://octave-online.net/). I haven't tried Octave 4.2.

This also affects `str2num` (because it internally uses the two-input version of `eval`). Try for example

To fix `str2num`, simply replace line

by

Luis Mendo <lmendo>

 

(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 mmuetzel (Posted a comment)
  • -unavailable- added by lmendo (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
    Wed 30 Nov 2016 05:25:10 PM UTCmmuetzelStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1