[futurebasic] STR# question

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 1999 : Group Archive : Group : All Groups

From: "Terrald J. Smith, M.D." <tjsmith@...>
Date: Fri, 14 May 1999 06:37:51 -0500
I know....your suggestions to kiss my STR# stuff is right but it is taking
several minutes to load the 800k file over the network to put into STRING$()
stuff.  I would like to try the STR# stuff one time only at the initial
load.  I can do an initial loop to convert but it takes about 30 seconds on
my G3.  I tried to modify the suggestion (which works great) that Jay gave
for converting the read file# to the string$() stuff but trying to go from
the STR# to string$() is another one of my flaws.

Obviously, I am not a good programmer.  This is giving me a bad offset.

itemnumber=FN countStr(_diagnosislistSTR)
LONG IF itemnumber>0
    StrHndl& = FN GETRESOURCE(_"STR#",_diagnosislistSTR)
    OSErr  = FN HNOPURGE(StrHndl&):gOffSet&=0
    FOR Myloop=1 TO itemnumber
      POKE @DIAGNOSIS$(Myloop),48           'Set length byte
      BLOCKMOVE [StrHndl&]+gOffSet&,@DIAGNOSIS$(Myloop)+1,48'move string
      gOffSet& = gOffSet& + 48              'get offset of next string
    NEXT
    OSErr  = FN HPURGE(StrHndl&)
END IF

Corrections?

Thanks, Terrald