Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Converting to Long Integers

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,65364
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Converting to Long Integers
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Converting to Long Integers - 10/21/2008 8:01:43 PM   
  4scriptmoni


Posts: 208
Score: 0
Joined: 5/3/2007
Status: offline
I got a script that is not working well, I think its because of its variables being big numbers.
I am basicly trying to make file size comparations, and since its output is in bytes it gets quite long.

Everytime I try to do Cint or CLng or CByte it respond with an Overflow. Beause the data is recived as a script argument.
I just checked the type and it is VarType = 8 String...
So I guess I would be able to convert a String to a Long Integer? Is that even posible? Yes my string is only Numeric...

_____________________________

Enterprise Microsoft Scripts
Exchange, Login/Logout Monitor,TS, Monitoring, Security, AD, etc...
http://www.felipeferreira.net
 
 
Post #: 1
 
 RE: Converting to Long Integers - 10/22/2008 12:27:44 AM   
  dm_4ever


Posts: 2728
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
You probably tried it, but I didn't see it listed...so did you try CDbl ?

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to 4scriptmoni)
 
 
Post #: 2
 
 RE: Converting to Long Integers - 10/22/2008 12:44:47 AM   
  TNO


Posts: 1402
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
This may give  a clue
http://www.visualbasicscript.com/m_61158/mpage_1/key_wsf/tm.htm

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: Converting to Long Integers - 10/22/2008 1:48:36 AM   
  4scriptmoni


Posts: 208
Score: 0
Joined: 5/3/2007
Status: offline
I gave up on trying to convert that. I just made the other workaround, get the value in MB and change it latter to bytes using this function

Function toBytes(Megabytes)
toBytes = int ((Megabytes * 1024) *1024)

End Function

_____________________________

Enterprise Microsoft Scripts
Exchange, Login/Logout Monitor,TS, Monitoring, Security, AD, etc...
http://www.felipeferreira.net

(in reply to 4scriptmoni)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Converting to Long Integers Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts