04-17-2004, 12:01 PM
hi all
I am writing a utility program in java that reads a quickbasic random access file and creates an XML file from it. This random access file is created by an old quickbasic application.
The format for the random file is
OPEN in$ FOR RANDOM AS #1 LEN = 50
FIELD #1, 4 AS l1$, 4 AS d1$, 4 AS l2$, 4 AS d2$, 2 AS T1$, 2 AS R1$, 30 AS BE$
here l1,d1,l2 and d2 are float values(4 bytes)
T1 and R1 are short integers (2 bytes)
This file is read as
GET #1, a
l = CVS(l1$): d = CVS(d1$): l2 = CVS(l2$): d2 = CVS(d2$): t = CVI(T1$): R = CVI(R1$)
I am able to convert the short integers in to java but am facing problem in converting the float values.
Can any one please help me. I would lke to know how float is stored in quickbasic.
I am writing a utility program in java that reads a quickbasic random access file and creates an XML file from it. This random access file is created by an old quickbasic application.
The format for the random file is
OPEN in$ FOR RANDOM AS #1 LEN = 50
FIELD #1, 4 AS l1$, 4 AS d1$, 4 AS l2$, 4 AS d2$, 2 AS T1$, 2 AS R1$, 30 AS BE$
here l1,d1,l2 and d2 are float values(4 bytes)
T1 and R1 are short integers (2 bytes)
This file is read as
GET #1, a
l = CVS(l1$): d = CVS(d1$): l2 = CVS(l2$): d2 = CVS(d2$): t = CVI(T1$): R = CVI(R1$)
I am able to convert the short integers in to java but am facing problem in converting the float values.
Can any one please help me. I would lke to know how float is stored in quickbasic.