cc: [email protected]
Subject: Re: Problem in ksh93 93t+ (my reference 46004)
--------
> AIX 6.1 (ddaap128/ Version M-12/28/93e):
> 6100-06-06-1140
>
> hdisk0 root@wlc:/ set | grep -i vers
> .sh.version='Version M-12/28/93e'
>
> $ ksh93
> $ typeset -A SRL_TM
> $ SRL_TM[100D6AP]=1
> $ print -- ${SRL_TM[100D6AP]}
> 1
> $ print -- ${!SRL_TM[100D6AP]}
> 100D6AP <<<<<<<<<<<< this looks good
> -------------------------------------------------------
> AIX 7.1 (poaim001/ Version M 93t+ 2009-05-01):
> 7100-02-02-1316
>
> hdisk0 root@wlb:/ echo $KSH_VERSION
> Version M 93t+ 2009-05-01
>
> $ ksh93
> $ typeset -A SRL_TM
> $ SRL_TM[100D6AP]=1
> $ print -- ${SRL_TM[100D6AP]}
> 1
> $ print -- ${!SRL_TM[100D6AP]}
> SRL_TM[100D6AP] <<<<<<<< this is different now
> ------------------------------------------------------------------
> test with linux
>
> $ ksh93
> $ echo $KSH_VERSION
> Version AJM 93t+ 2010-06-21
> $ typeset -A SRL_TM
> $ SRL_TM[100D6AP]=1
> $ print -- ${SRL_TM[100D6AP]}
> 1
> $ print -- ${!SRL_TM[100D6AP]}
> SRL_TM[100D6AP]
> ------------------------------------------------------------------
> so the problem is also in place with Linux!
>
> The according ksh93 man page reads:
>
> ${!vname[subscript]}
>
> Expands to name of the subscript unless subscript is *, @. or of the
> form sub1 .. sub2. When subscript is *, the list of array subscripts
> for vname is generated. For a variable that is not an array, the
> value is 0 if the variable is set. Otherwise it is null. When
> subscript is @, same as above, except that when used in double
> quotes, each array subscript yields a separate argument. When
> subscript is of the form sub1 .. sub2 it expands to the list of
> subscripts between sub1 and sub2 inclusive using the same quoting
> rules as @.
>
> According to that description I would see the new behaviour as defect.
> Do you agree with that?
>
> Best Regards,
>
I don't recall making this change and at least on first reading
it appears to be an unintended change, I believe that it is a
bug. If I can find a reason for the change, I will let you
know. Meanwhile it is on my buglist for ksh93v.
David Korn
[email protected]
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users