On Mon, Jul 22, 2013 at 11:00 AM, Dan Douglas <[email protected]> wrote: > In this type, I can't think of any way to refer to "obj" from within "x.get". > _ should point to "obj" in this context, not "obj.x". > > #!/usr/bin/env ksh > > typeset -T Type=( > typeset -h 'This will be a property.' x > integer -h 'This will be the backing field for x.' y=5 > > function x.get { > # Huge problem here because _ refers to x, > # we can't access anything. > ((.sh.value = ++_.y))
This can't work. .sh.value is identical to _ Think about ksh93 types as compound variables with predefined discipline functions. In your example you're trying to assign the value of ++_.y to the value of a compound variable - which obviously cannot work. Irek _______________________________________________ ast-users mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-users
