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

Re: why do ceil/floor give the decimal dot?



Peter Stephenson <p.stephenson@xxxxxxxxxxx> writes:

> So if you're happy it does fit, just convert to
> integer yourself.

Yeah, but you see what happened? On the one hand, you
shouldn't care what type it is and leave that to the
shell to work out. On the other hand, if you want
output that is manageable and that conforms with how
humans think of integers as well as the output of ceil
and floor, then you must convert to int manually!

I like the solution better to have the types all
floats (or whatever) and then use printf to make it
look the way you want.

-- 
underground experts united
http://user.it.uu.se/~embe8573



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