cc:  [email protected]  [email protected]
Subject: Re: Re: [ast-users] ksh93 returns "()" for "${a[@]}" if I clear an 
array  with a=( )
--------


> This is not very intuitive. First variable a has already be declared
> as an array so the intuitive feeling would be that a=() resets it with
> an empty array. 2nd your interpretation assumes that the called
> function knows the array data type to reset it - which becomes a pain
> if you have hundreds of types defined and try to use a utility
> function which should reset an array of any of these types.
> 
> I'd better go for: a=() means reset the variable if variable a is
> either array or compound. If it isn't already a type of these make it
> a compound variable. If variable a is of type integer or string throw
> an error.
> This should make things more predictable.
> 
> Ced
> -- 
> 

This is a reasonable suggestion.  I will add it to my todo list.

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

Reply via email to