bugGNU Octave - Bugs: bug #40965, curly braces confuses parsing of...

 
 

bug #40965: curly braces confuses parsing of anonymous function

Submitted by:  Felipe G. Nievinski <fgnievinski>
Submitted on:  Thu 19 Dec 2013 04:22:05 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 19 Dec 2013 01:01:23 PM UTC, comment #4:

Confirmed that this did not work in 3.6.4 but does work in 3.8.0-rc1, marking as fixed.

Mike Miller <mtmiller>
Project Administrator
Thu 19 Dec 2013 12:16:56 PM UTC, comment #3:

now it seems I tested that on 3.6.4 (not dev as I said originally), downloaded from sourceforge.

Felipe G. Nievinski <fgnievinski>
Thu 19 Dec 2013 07:13:15 AM UTC, comment #2:

in between curly or square braces,
spaces are interpreted as element separators, for example:

therefore sometimes using spaces in that context confuses the parser, you should try defining the function handle without spaces.

In this particular case, though, I cannot seem to reproduce the behaviour you mention:

What version of Octave exactly are you using? where did you get it from?

c.

Carlo de Falco <cdf>
Project Member
Thu 19 Dec 2013 04:23:29 AM UTC, comment #1:

although that doesn't work in matlab either... hum.

Felipe G. Nievinski <fgnievinski>
Thu 19 Dec 2013 04:22:05 AM UTC, original submission:

octave:> {@(x) sin (x)}
error: 'x' undefined near line 121 column 13
error: evaluating argument list element number 2

{@(x) sin (x)} doesn't work
{@(x) sin(x)} works
@(x) sin (x) works
(and {@sin} works, sure, but that's not the point)

Felipe G. Nievinski <fgnievinski>

 

(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 cdf (Posted a comment)
  • -unavailable- added by fgnievinski (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 19 Dec 2013 01:01:23 PM UTCmtmillerStatusWorks For Me=>Fixed
      Open/ClosedOpen=>Closed
      Operating SystemMicrosoft Windows=>Any
    Thu 19 Dec 2013 07:13:15 AM UTCcdfStatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1