[futurebasic] [FB] FB5 data file conversion help

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2011 : Group Archive : Group : All Groups

From: Douglas Stemen <dstemen@...>
Date: Sat, 4 Jun 2011 08:51:02 -0400
My largest program conversion from FB4 to FB5 now compiles. In this initial step I converted file handling using FSSpec (although I understand that it will need to go to FSREF or CFURLRef). This program must be able to read 60 different data files that contain years of accounting & production data. I am able to load data files and all string variables read correctly, but the short and long integers are wrong. Integers appear to be multiplied times 256 until the result reaches 32k or so and then they go negative or some random large number. I do not save decimal numbers in the files based on Staz's recommendation many years ago (because Apple could change interpretation).

Files contain records with variables typed in this manner...

"BEGIN RECORD paramRecord
DIM 13 gtaxaccount$
DIM DETAILNUM2%
DIM maxaccounts2%
DIM CLIENTNUM2%
DIM INVENNUM2%
DIM PREPAYNUM2%
DIM GRAINBANKNUM2%
DIM 13 MinSC$
END RECORD 
DIM parameter1 as paramRecord"

Can someone help me to understand how to get this to correctly read short and long integer variables?

Thank you

Doug