Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Problem with an exported array

Wayne Davison wrote:
> Here's my trick: use "ct" (it's already multi-use).  A tied variable is
> already excluded from being a special type of integer, so my change just
> excludes the "ct" from being taken as a field width.  See if you can see
> any problems with this.

This does break the existing function,

% typeset -T FOO foo
% foo=(bar rod)
% typeset -R 15 FOO
% print $FOO

and (unless you've taken special steps to fix it) you run the risk of
the ct element being used for both when you request `typeset -R 15 FOO'.

However, you only need eight bits (until we have wide characters, which
is another future nightmare) and ct is at least 32, so it's

I would be tempted to add -S as a single flag now and wait until we have
a better (virtual) interface to the parameters, then add a more
general flag.  As Oliver says, a different option letter would be more
appropriate for the general case anyway.

Eventually, I'd like struct param to become opaque to code outside
params.c and use something like a single (vtable-style) pointer for
type-specific bits.

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070

The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
If you received this in error, please contact the sender and 
delete the material from any computer.

Messages sorted by: Reverse Date, Date, Thread, Author