octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: displaying structure arrays


From: Francesco Potorti`
Subject: Re: displaying structure arrays
Date: Wed, 08 Apr 2009 10:14:16 +0200

>Overall, we have this display behaviour for the container types in octave:
> - structures can be printed up to a certain level controlled by the
>struct_levels_to_print function
> - cell arrays are always shown fully (as far as I know)
> - structure arrays are only shown to the first level (i.e. field names) now
>
>Actually, I would vote for a consistent way to control the display depth in all
>three cases. So what do you think about this:
>We replace the struct_levels_to_print function (and internal variable) by a
>levels_to_print function that controls the printing depth in all three cases?

I thiught about this, and I am not convinced that a single parameter is
enough to control the printing of containers.  For non-array containers
we need to limit the depth; for array containers we need to limit the
number of elements: I suppose that the current behaviour of not printing
contents of struct arrays that have more than one element is dictated by
this second need.

If the above is at least partially true, we need more than one
parameter.  For example, we could have struct_levels_to_print and
struct_array_elem_to_print.  By default, one could set them to print 3
levels, where arrays in the first 3 levels are printed only for the
first 10 elements.

-- 
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: address@hidden
(entrance 20, 1st floor, room C71)     Web:   http://fly.isti.cnr.it/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]