[futurebasic] Re: [FB] Using record pointers

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

From: pochas <pochas@...>
Date: Fri, 24 Sep 1999 01:40:14 -0400
> > I use pointer notation to reference records in a handle, so I was sorry
> > to see that
> >
> > EDIT$(222+n)= USING "###.###" ; Fptr&.someVal#   (FBII)
> >
> > doesn't work in FB^3.  You need a string as a go-between.
> >
> > a$ = USING "###.###" ; Fptr&.someVal#            (FB^3)
> > EDIT$(222+n)= a$
> >
> > I'd sure like to be able to continue using the first structure.
>
> > Regards,  Charles P.

> Have you tried increasing the _FBStrStkSize constant to 16k from 2k ?
> Just a thought.

> Hint: it's in FB3's header files so you won't really be making the change if
> you are using FB^3 off the CD.

> Anders...

I found the constant you mentioned and set it to 16384, but that does
not fix the problem.  The following code demos it.  This is not a fatal
problem and it has a simple workaround, but I would like to see FB^3 as
robust as possible.

  Regards, Charles P.

dim record myFloat
  dim  20 aStr$
dim end record _myFloatLen
dim a$, mHnd&, myPtr&

end globals

window 1, "Edit$() Statement"

edit field 13, "", (10,10)-(110,26), _statFramed
edit field 14, "", (10,30)-(110,46), _statFramed


mHnd& = fn newhandle (_maxInt)
myPtr& = [mHnd&]
myPtr&.aStr$ = "Apple"

// This form doesn't work.
EDIT$(13) = myPtr&.aStr$

//This does.
a$ = myPtr&.aStr$
edit$(14) = a$

do
  handleevents
until 0