[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: How to trunc a real?
- From: Reuben Thomas <rrt1001@...>
- Date: Fri, 27 Oct 2000 16:46:10 +0100 (BST)
> Since you only have one numerical type, I think the only way (besides
> calling a registered routine of course) is to convert the number to text
> format (via the format routine), and parse it.
You can use:
function int(n)
if n < 0 then return ceil(n)
return floor(n)
end
(untested, but you get the idea)
--
http://sc3d.org/rrt/ | Si hoc legere scis nimium eruditionis habes.