The following function behaves somewhat peculiar:

function f
{
    ksh --version       # 1993-12-28 s+
    typeset p t

    p=f
    typeset +f $p       # OK
    t=$(typeset +f $p)
    print "$t"                # ?? empty

    set -- f
    typeset +f $1       # OK
    t=$(typeset +f $1)
    print "$t"                # OK
}

The crucial part is the assignment 't=$(typeset +f $X)'. If X is a normal name, and $X is "f", the result is empty. If X is 1, and $1 is "f", the result is whatever 'typeset +f f' outputs.

Looks like a bug to me. Or are normal variables and positional parameters supposed to behave different in this context?

Regards,
Bernd

--
Bernd Eggink
[EMAIL PROTECTED]
http://sudrala.de
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to