[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #40965] curly braces confuses parsing of anony
From: |
Carlo de Falco |
Subject: |
[Octave-bug-tracker] [bug #40965] curly braces confuses parsing of anonymous function |
Date: |
Thu, 19 Dec 2013 07:13:15 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:25.0) Gecko/20100101 Firefox/25.0 |
Update of bug #40965 (project octave):
Status: None => Works For Me
_______________________________________________________
Follow-up Comment #2:
in between curly or square braces,
spaces are interpreted as element separators, for example:
>> {1 2 3}
ans =
{
[1,1] = 1
[1,2] = 2
[1,3] = 3
}
>> >> {1, 2, 3}
ans =
{
[1,1] = 1
[1,2] = 2
[1,3] = 3
}
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:
>> version
ans = 3.8.0-rc1
>> a = {@(x) sin (x)}
a =
{
[1,1] =
@(x) sin (x)
}
>> a{1}(1)
ans = 0.84147
>>
What version of Octave exactly are you using? where did you get it from?
c.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40965>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/