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

Re: forcing output type



Clint Adams wrote:
>Would anyone object to something like $(( [#.] 2/3 )) to
>avoid integer truncation?

It's not a very clean way to do it -- it's changing the input language
for an expression, and doesn't inherently apply to the entire $(())
(unlike the existing "[#n]" output-base flag).  It would be better to
localise it; say, "floatops{2/3}" as a subexpression.

But I wonder why you want to do this at all.  What application do you
have in mind?

-zefram



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