mbt masai
 
Welcome !
         

                                
After experiencing a lot of down time, We decided to move this site to CrystalTech.com. CrystalTech.com is powered by only the finest Windows servers providing the best performance, reliability, and value anywhere.

 HELP Move string to integer

Author Message
joeybanana

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 2/15/2010
  • Status: offline
HELP Move string to integer Monday, February 15, 2010 9:19 AM (permalink)
0
I have a binary field (represented as 12 characters)...   MYFIELD
 
The first 4 bytes are really an integer (Long) MYLONG   and the next 8 bytes are really a double   MYDBL
 
We use MYFIELD as an array of char to hold multiple values and multiple data types...  in our applicaiton code, we just move the physical memory from variable to variable... 
 
so, MYLONG = 25 and MYDBL  = 15438706.0000   and we move them into MYFIELD[1] (for 4)  and MYFIELD[5] (for 8)...   getting
 
MYFIELD  =  (#25, #0, #0, #0, #0, #0, #0, '@', 'n', 'r', 'm', 'A')
 
I need (in vbscript) a way to pull out these values back into 2 varibles... but I can't declare integers or doubles and it thinks MYFIELD evaluates as a string... I can do MID()  ASC()  MIDB()  but none of these truly move the memory into a long and double to return my original values...
 
I really need      DIM  MyLong as Int
                          Dim  MyDbl as Double
 
                          MyLong = copy(MYFIELD,1,4)    or    Move(MyField[1],MyLong,4)
                          MyDbl = copy(MYFIELD,5,8)      of     Move(MyField[8],MyDbl,4)
 
                          response.write MyLong    =  25
                          response.write formatnumber(mydbl)  =  15438706.0000
 
HELP...
 
Joe
 
 
 
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • 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
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.8
    mbt shoes www.wileywilson.com