john wrote:
>
> Is there any way to assign a real variable to an integer variable?
>From ISO10206:
6.7.6.3 Transfer functions
trunc(x)
From the expression x that shall be of real-type, this function
shall return a result of integer-type. The value of trunc(x)
shall be such that if x is positive or zero, then 0 <= x -
trunc(x)
< 1; otherwise -1 < x <= x - trunc(x). It shall be an error if
such
a value does not exist.
Examples:
trunc(3.5) {yields 3}
trunc(-3.5) {yields -3}
round(x)
From the expression x that shall be of real-type, this function
shall return a result of integer-type. If x is positive or zero,
round(x) shall be equivalent to trunc(x+0.5); otherwise, round(x)
shall be equivalent to trunc(x-0.5) It shall be an error if such
a value does not exist.
--
Merry Christmas, Happy Hanukah, Happy New Year
Joyeux Noel, Bonne Annee.
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>
--
Posted via a free Usenet account from http://www.teranews.com


|