Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: 3.1.6-pws-5: math fix
- X-seq: zsh-workers 8017
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: 3.1.6-pws-5: math fix
- Date: Thu, 23 Sep 1999 10:21:46 +0200
- In-reply-to: "Sven Wischnowsky"'s message of "Thu, 23 Sep 1999 10:40:54 DFT." <199909230840.KAA23352@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Sven Wischnowsky wrote:
> > Actually, it would be more efficient to unload the
> > arguments onto the stack at the point the function is found, like the grown
> > up languages do, but that wouldn't fit with calling functions with string
> > arguments.
>
> That's why I thought people would complain about that kind of math function.
I don't know what you had in mind, but it occurs to me the major potential
use of that sort of math function is with keywords. For example,
$(( limit(coredumpsize) )) could return the appropriate limit, with MB's
and KB's expanded out in this case. That would be quite neat.
if (( limit(coredumpsize) == 0 )); then
print "Warning: programmes will not dump core" >&2
fi
But I'm sure someone else will have fun writing such things.
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author