[futurebasic] Re: [FB] [FB^3] True records and handles

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2000 : Group Archive : Group : All Groups

From: Paul Bruneau <paul_bruneau@...>
Date: Wed, 20 Dec 2000 11:55:32 -0500
I don't know why it isn't working for you. Can you give more detail? I
use that syntax all the time with my true records. Here is some snipped
code so you can see how it looks (It is some linked list stuff from my
big application). True records don't use offsets, but it's nearly the
same idea. You have a record with known elements instead of byte
offsets. FB knows the name of your elements, and knows where they are in
the record. I have dimmed currItemHnd as handle to itemRec, and FB knows
all the names of the elements in itemRec. The LONG IFs that I have down
there look just the same as they did when I was using pseudo records (if
memory serves me). In my project I used a ton of pseudo records, and now
all true records.

DIM prevItemHnd as handle to itemRec
dim nextItemHnd as handle to itemRec
DIM currItemHnd as handle to itemRec
DIM 255 temp$
DIM newItemHnd as handle to itemRec

prevItemHnd = _nil'no previous item yet
currItemHnd = gMasterItemListHnd

'--------Here, we're going to check to see if it's an exact match
LONG IF currItemHnd..itemLength% = myLength%
LONG IF currItemHnd..itemWidth% = myWidth%
LONG IF currItemHnd..itemType% = myType%
LONG IF currItemHnd..itemFinish$ = myFinish$
LONG IF currItemHnd..itemInfo1% = myInfo%





> >Now I want to use the record above as offsets into a handle.
> >
> >A long time ago (in a galaxy, far, far away) when I used pseudo records I
> >could create a handle and then:
> >
> >myH&..aRecordDimmedInAPseudoRecord& would work, but now it don't when I use
> >a real record