I believe it's because nested is defined as an empty compound and you are trying to access a member (z) which was not in the original definition as it was empty. So you could predefine the z member, but it would be nice to be able to have the ability to insert dynamic structured data like you are trying to do. I do not know the best practice OO way though to do this if it would be added as a feature. You can always add elements to arrays though.
On 3 February 2017 at 20:35, Cedric Blancher <cedric.blanc...@gmail.com> wrote: > Why do compound structs not work in ksh types? > > typeset -T vm_t=( > compound nested > integer size > float f=0 > ) > > compound container=( > vm_t -A foo=( > [f]=( > f=-inf > nested=( z=1 ) > size=1 > ) > ) > ) > > print -v container > > > returns the error test.ksh[17]: print: nested.z: is not an element of > container.foo[f] > > Ced > -- > Cedric Blancher <cedric.blanc...@gmail.com> > [https://plus.google.com/u/0/+CedricBlancher/] > Institute Pasteur > _______________________________________________ > ast-users mailing list > ast-users@lists.research.att.com > http://lists.research.att.com/mailman/listinfo/ast-users -- Regards Danny _______________________________________________ ast-users mailing list ast-users@lists.research.att.com http://lists.research.att.com/mailman/listinfo/ast-users