Converting a String variable into Integer

Hi,
I am passing a variable to a unix function.
However when I try to assign the value to another variable like
typeset -i I_CACHE_VAL=$2
Is this because of String to Integer conversion?

I get an error.
Please help me with thsi.

Thanks

IF typeset -i thinks the data is not numeric you get an error like:

> file=ploop
> typeset -i x=$file
ksh: ploop: bad number

Then what should be the solution?