On 1/13/09, David Korn <dgk at research.att.com> wrote:
> cc:  shell-discuss at opensolaris.org  don.cragun at sun.com pkchris at 
> users.sourceforge.ne
>  Subject: Re: Re: [ksh93-integration-discuss] CR 6791838 Created P3 
> shell/korn93  *ksh93* unset of a variablewhich is not set should return 0
>  --------
>
>
>  > Doesn't [[ ${x+y} ]] expand variable x?
>  > x= ; x.get() { print "hello" ; } [[ ${x+y} ]] ; print $?
>  > prints
>  > hello
>  > 0
>  > ${x+y} will be a big performance regression if compared to if (unset -e x)
>  >
>  > Chris
>  >
>
>
> It currently does expand x, but I don't think that this is necessary
>  and I could change this.  I could detect that x is followed by a + and just
>  check for not set.

[[ ${x+} ]] would check if a variable exists? Which function does y in
${x+y} have?

Chris
-- 
    ^---^
   (@)v(@)  Chris Pickett
   |    /   IT consultant
 ===m==m=== pkchris at users.sourceforge.net

Reply via email to