On Tue, Dec 21, 1999 at 10:58:19AM -0800, Michael S. Davis wrote:
> On Tue, 21 Dec 1999, Ramel Levin wrote:
> 
> > UInt  recordNum = 0;
> > DmSeekRecordInCategory(inDbP, &recordNum, inOffset, dmSeekForward,
> > inCategory);
> > 
> > inOffset would be 3 in your case and you'll get the number in recordNum
> 
> This is a totally confusing function description in the API
> docs.  Offset is said to be the "number of records to move forward
> or backward"; not 3rd or 4th in Category.
> 
> The descriptions also states: DmSeekRecordInCategory "Returns the index
> of the record at the offset from the passed record index".
> 
> Now &index clearly seems to indicate that an index is returned but
> the "offset from the passed record index" is not obvious what that
> means.  In fact, it does not seem to mean the number within the category
> at all.

&index is used for both input and output.  If index is initially set to
zero, then on output it will be set to the offset'th record in the
category.  If index points to some record in the category, then it will
advance thru the category by offset records.  

> 
> Why would it not just say that offset "is the index of the
> record within the category"?
>

Because it's not, in general.  It is the index of the nth record in the
category if the input index is zero.

-Ben

-- 
Ben Darnell              [EMAIL PROTECTED]
http://thoughtstream.org

Reply via email to