[futurebasic] XREF

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1997 : Group Archive : Group : All Groups

From: "David Cottrell" <David.Cottrell@...>
Date: 10 Nov 97 17:08:35 +1000
Just to add to my earlier note, here is the code which is causing me such
pain. It appears to run without the macbugs, but when it is on it crashes
as soon as one tries to write to the record. I assume this cant be good.

Thanks
David

globals

DIM RECORD MyRec
  DIM MYmean!
  DIM 63 MYString$
DIM END RECORD .MyRec

_bazillion      =1000000
_realMax        =1000

XREF @ gList.MyRec(_bazillion)

---------------------------------------------------
LOCAL FN enterData
DIM myArray.Top&

XREF@ myArray.MyRec(_realMax)

myArray.Top& = gList.Top&

FOR x = 1 TO 3
	myArray.MYmean!(x)      = x + 0.001	'crash big time here!!!
	myArray.MYString$(x)   = "The String"
NEXT x

'FN printData

err% = FN DISPOSHANDLE (myArray.Top&)             'trash handle when done

END FN

fn to set up handle:
LOCAL FN setUpData
  gList.Top& = FN NEWHANDLE (3 * _MyRec)
END FN

fn to clean up after
LOCAL FN trashData
  err% = FN DISPOSHANDLE (gList.Top&)             'trash handle when done
END FN

------------------------------------------------------------------
Dr David Cottrell                							James Cook University
                                		
All unconventional spellings that you might notice in the above are
intentional, and are just part of a living dynamic language.
------------------------------------------------------------------