[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lists of objects?
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: Lists of objects? |
Date: |
Sun, 28 Oct 2012 11:13:54 -0400 |
On 28 October 2012 09:12, Joanna Rutkowska <address@hidden> wrote:
> On 10/25/12 23:23, Sergei Steshenko wrote:
>> [snip]
>>>
>>>
>>> obj1 = xxx ()
>>> list = {list, obj1}
>>>
>>> obj2 = xxx ()
>>> list = {list, obj2}
>>>
>>> The code above unfortunately doesn't work well, because it creates nested
>>> cell arrays.
>> How about the following:
>>
>> "octave:1> list_of_objects = {}
>> list_of_objects = {}(0x0)
>> octave:2> foo = 1
>> foo = 1
>> octave:3> list_of_objects{end + 1} = foo
> Thanks, that worked! Any idea why I couldn't use normal lists for stroing
> objects of the same type, as described in my original message?
It may quite possibly be a bug. Can you post a complete example of how
to reproduce it? i.e. give me some code to run so I can see the
problem.
- Jordi G. H.