Subject: Re: [ast-users] Discipline function with array values
--------

> Are discipline functions supposed to work with indexed array assignments?
> In ksh 2010-03-05, I find that the set and append disciplines are never called
> for variables assigned to with e.g. x=(a b) or set -A x a b.  Curiously, they
> do work with associative arrays.  Also, once I've tried one of the above type
> of assignments, the functions are no longer called for associative array or
> scalar assignments.  But I specifically need indexed arrays.
> 
>         John
> 

This is not clearly defined.

        x=(....)
currently does an unset on x and the does the assignments.

So I would expect the the unset disciplines would be called for each of
the elements that existed before the assignment.  However, any disciplines
should be removed.

Since there is no discipline funtion yet defined, no set discipline should
be called.

For
        x+=(....)
I would expect the set discipline to be called for each element.

David Korn
[email protected]
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to