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