>>>If you can't use Int(), Round(), Floor(), Ceiling() or
>>>any similar function to cut off integer.
>>>
>>>cAn you write a function equiv. to Round()?
>>>Of cos, You can use / and % (mod) ^_^;
>>
>>Off the top of my head
>>
>>lcdeci = SET ('Decimals')
>>x='3423432.3523'
>>SET DECIMAL TO 0 && if not, you get trailing 0's on ?y to screen
>>y=VAL(STR(x))
>>SET DECIMALS TO lcdeci && Set Deci back to default
>>
>>*****
>>This is how I would do it if I couldn't use the built in functions.
>
>Fred,
>You don't need to set decimals - STR() cuts off at the decimal point anyway. So y=val(str(x)) will suffice. However, this only cuts off the decimals - it does not deal with rounding if above half an integer. Regards,
!! Correction - I just tried this and it DOES deal with rounding - I tried x=3456.987, y=val(str(x)) and y then contained 3457!!