Think of it like this. A millimeter is 0.001 of a meter. So in a sense it is a fractional meter. But if you deal in integral millimeters (store them in an int) then you won't get any rounding problems.

But you can define your own unit. Eg. a micrometer being 0.000001 of a meter. Of course, since an

int only goes up to 32767 you might need to be cautious about how big your values might get, but you could always store them in a

long, which goes up to 2147483647.

So if you use micrometers, then 1000000 micrometers represents a meter.

can I define my function as INT and have decimal values ? like 10.5 10.8 ecc. ecc ?

In my example of micrometers, if you want 1.5 meters then you would use 1500000 micrometers.