Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Text /
Chapter 5 - Text Utilities / Text Utilities Reference
Data Structures /


The Offset Table Record

The FindWordBreaks procedure uses the offset table, which is defined by the OffsetTable data type. You pass a record of this type by VAR to FindWordBreaks, and it fills in the fields to specify the location of the next word in the input string. The FindWordBreaks procedure is described in the section "FindWordBreaks," which begins on page 5-77.

OffsetTable = ARRAY [0..2] of OffPair;

OffPair =
RECORD
   offFirst: Integer;   {offset of first word boundary} 
   offSecond: Integer;  {offset of second word boundary} 
END;
Field Description
offFirst
The offset in bytes from the beginning of the string to the first character of the word.
offSecond
The offset in bytes from the beginning of the string to the last character of the word.
Although the offset table contains three OffPair records, the FindWordBreaks procedure fills in only the first of these records with the offset values for the word that it finds. The other two entries are for use by the HiliteText procedure, which is described in the chapter "QuickDraw Text" in this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996