Asp "typecast" or convert string to int
Posted on 2004-04-07
I seem to have a really weird issue with converting string to int in ASP.
I know that basically it should work like this :
TheInteger = Cint(TheString)
Now, what hapens in my code , is that I declare a variable and do some string type manipulation on it, after I have my result , I attempt to convert it to Int.
Now, what happens is that the moment that convertion takes place ,
the DLLHost process on my machine goes to 99% CPU usage and stays there for a while; it eventually goes down to normal ??
So , phseudo for this is as follows :
<Do some stuff with that variable >
<like using the Left() and Right() functions>
<to extract values>
Now, Declare Variable number two :
MyIntegerValue = CInt(TheStringVariable) <--- This gives me headaches ?
Any help / pointers will be greatly appreciated !