Structs and display2d



Thanks for enlightment.

As you write there should be a difference between display2d=false and
grind. The documentation says

1. When `display2d' is `false', the console display is a string
(1-dimensional) form rather than a display (2-dimensional) form.

2. The function `grind' prints <expr> to the console in a form
suitable for input to Maxima.

Following this only grind(struct) should result in what I get with
display2d=false at the moment while display2d=false shouldn't hide the
field names which contain useful information.

For getting a working test file where answer and input must be the
same I will wrap the structs in a grind.

Thanks
Volker


2012/12/2 Robert Dodier <robert.dodier at gmail.com>:
> On 2012-12-02, Volker van Nek <volkervannek at gmail.com> wrote:
>
>> Structs are displayd quite differently depending on display2d. Is this a bug?
>
> Well, at present the display2d=false display of structures is a readable
> representation, so if you input that stuff, you get the same object. The
> field names are displayed when display2d=true as a convenience, but
> they're not necessary for input -- as it stands, they can't be part of
> the input, because then something like foo=bar where foo is a field name
> is ambiguous -- does it mean value foo for field bar, or value foo=bar
> (an equation) for foo or any other field?
>
> That said, maybe only grind needs to output a readable representation --
> maybe display2d=false need only be 1-dimensional. I suppose the 1-d
> display code for structures could attempt to distinguish grind from
> display2d=false.
>
> best
>
> Robert Dodier
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima