> If I have
>
> float y;
> UInt16 x;
>
> y = x / 100;
>
> will the division take place in FP because of y?

no.

the compiler will recognise 'x' as being an integer and 100 as
an integer and do the division using integer division. your
value for y will always be 0.

if you want to force it to be floats, you have many options

y = (float)x / 100;
y = x / (float)100;
y = x / 100.0;

etc.. this is a standard C language issue; nothing related to palm

http://drpaulcarter.com/cs/common-c-errors.php#2.5

a nice page with a list of very common C programming errors

-- 
// Aaron Ardiri

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to