vbscript funtion turn string to int

what is the name of the vbscript function that turns string to int
???
[79 byte] By [Organize] at [2007-11-19 2:45:22]
# 1 Re: vbscript funtion turn string to int
CInt() ( http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vtoriFunctions.asp) :D
visualAd at 2007-11-8 0:20:14 >
# 2 Re: vbscript funtion turn string to int
clng() if the number could ever be bigger than 32,000 :o hehehehehe
Vanny at 2007-11-8 0:21:14 >
# 3 Re: vbscript funtion turn string to int
clng() if the number could ever be bigger than 32,000 :o hehehehehe Surley you mean 32,767. ;)
visualAd at 2007-11-8 0:22:10 >
# 4 Re: vbscript funtion turn string to int
something like that, can never remember it exactly of the top of my header, I just use clng all the time, as i never have to worry about a big number crashing my app.
Vanny at 2007-11-8 0:23:16 >
# 5 Re: vbscript funtion turn string to int
something like that, can never remember it exactly of the top of my header, I just use clng all the time, as i never have to worry about a big number crashing my app.
:eek: I must be sat in front of my PC far too much to know what 2^15-1 is.

In general it is safer to use CLng because you are gauranteed to get an integer at least 4 bytes (32 bit) in size. Whereas the plain integer type, while more efficient and faster to use is platform and language dependant. In .NET an integer is 4 bytes for example, while in VB6 its only 2.
visualAd at 2007-11-8 0:24:15 >