From the standard, it seems that there expressions like 3 + 1.2 or 5.4 > 0
are not allowed because these operators expect both operands to be of the
same (base) type. So, I guess there should be means to convert between int
and float values, but these seem to have been forgotten in the standard.
I would propose to add the functions ceil, floor, and round to the set of
predefined functions, which provide the corresponding conversion. Also, it
might be a good idea to have a function that turns an int into the float
with the same value, e.g., 50 -> 50.0 . I can't think of a good name for it,
though.
Regards
Olle
Telelogic Tau 4.2 speeds up your wireless development!
Read more about it at
www.telelogic.com/tau42
Olle Palmgren
Director of Engineering, PD Test
Telelogic, St Persgatan 13, SE-753 20, Uppsala, Sweden
Phone: +46 18 66 18 59
Fax: +46 18 66 18 70
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.telelogic.com
Telelogic - Putting you ahead in software development!