bugGNU Octave - Bugs: bug #35472, inline function can't handle...

 
 

bug #35472: inline function can't handle structure.element references

Submitted by:  ira ekhaus <ibe>
Submitted on:  Tue 07 Feb 2012 11:35:35 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 3 - LowItem Group: Matlab Compatibility
Status: Wont FixAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.6.0Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 24 Sep 2014 11:10:44 PM UTC, comment #3:

I am closing this bug report. The inline function has been marked deprecated in recent versions of Matlab. Since this bug was set at low priority and is tagged as a Matlab compatibility item (and has not seen any interest in a couple of years), it seems like it is no longer that relevant to get it fixed. If this is wrong or something changes, feel free to comment or open a new bug report.

Mike Miller <mtmiller>
Project Administrator
Thu 09 Feb 2012 06:33:29 PM UTC, comment #2:

I neglected to mention that there is a simple workaround: Use anonymous functions. Anonymous functions are faster than inline ones anyways and are a better choice generally for code.

Example:

Rik <rik5>
Project Administrator
Wed 08 Feb 2012 10:21:44 PM UTC, comment #1:

Confirmed. The inline function does not use the full parser to detect whether an expression looks like a variable. It uses simpler rules which need some revision.

Rik <rik5>
Project Administrator
Tue 07 Feb 2012 11:35:35 PM UTC, original submission:

Here's a diff between matlab and octave that I haven't seen documented.

In matlab

>> isel=inline ('[ (FF.a) (FF.b)]')


isel =

Inline function:
isel(FF) = [ (FF.a) (FF.b)]

In octave
the result is not the same.

octave> isel=inline ('[ FF.a FF.b]')
isel = f(F, FF, a, b) = [ FF.a FF.b]
or trying to use the () to help.....
octave> isel=inline ('[ (FF).a (FF).b]')
isel = f(FF, b) = [ (FF).a (FF).b]

so , the interpreter is asking for more variables than I intend.

ira ekhaus <ibe>

 

(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 rik5 (Posted a comment)
  • -unavailable- added by ibe (Submitted the item)
  • -unavailable- added by ibe
  •  

    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
    Wed 24 Sep 2014 11:10:44 PM UTCmtmillerOpen/ClosedOpen=>Closed
    Wed 24 Sep 2014 11:10:43 PM UTCmtmillerStatusConfirmed=>Wont Fix
    Wed 08 Feb 2012 10:21:44 PM UTCrik5Priority5 - Normal=>3 - Low
      StatusNone=>Confirmed
    Tue 07 Feb 2012 11:35:35 PM UTCibeCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1