cc: [email protected]
Subject: Re: [ast-users] Can't use .sh.value to return values through function
members.
--------
> Hi, ${x.f} and ${ f;} should be the same AFAICT:
>
> #!/usr/bin/env ksh
>
> typeset -T X=(
> typeset val
>
> function f {
> .sh.value=${_.val}
> }
> )
>
> function f {
> .sh.value=${x.val}
> }
>
> X x=(val=hi)
>
> # Only ${ f;} produces output.
> printf 'x.f: %s\nf: %s\n' "${x.f}" "${ f;}"
> print -v .sh.version
>
> # x.f:
> # f: hi
> # Version AIJM 93v- 2013-06-28
>
> --
> Dan Douglas
> _______________________________________________
>
Currently functions that assign to .sh.value only produce output
when when used as ${ ...;} command substitution and the output is the
value of .sh.value along with the output of the function.
This is not documented so it will either be documented or it will
no longer output ${.sh.value} once I further investigate whether
this was a bug or intentional.
David Korn
[email protected]
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users