Set Group (211 [0xD3])

Function Code:	211 (0xD3)

Subfunction:	0

Function Name:	Set Alignment Character

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (211 [0xD3])

1	1 byte	Begin subfunction code (0)

2	short	Length (12 [0xC])

4	short	Old alignment character (no meaning in new values)

6	short	Old separator character (no meaning in new values)

8	short	New alignment character

10	short	New separator character

12	short	Length (12 [0xC])

14	1 byte	End subfunction code (0)

15	1 byte	End function code (211 [0xD3])

Function Code:	211 (0xD3)

Subfunction:	1

Function Name:	Set Underline Mode

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (211 [0xD3])

1	1 byte	Begin subfunction code (1)

2	short	Length (6)

4	1 byte	Old definition

5	1 byte	New definition

bit 0 = 1 underline spaces

bit 1 = 1 underline tabs, aligns, indents, etc.

6	short	Length (6)

8	1 byte	End subfunction code (1)

9	1 byte	End function code (211 [0xD3])

Function Code:	211 (0xD3)

Subfunction:	2

Function Name:	Set Footnote Number

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (211 [0xD3])

1	1 byte	Begin subfunction code (2)

2	short	Length (8)

4	short	Old # (no meaning in new values)

6	short	New #

8	short	Length (8)

Offset	Size	Meaning

10	1 byte	End subfunction code (2)

11	1 byte	End function code (211 [0xD3])

Function Code:	211 (0xD3)

Subfunction:	3

Function Name:	Set Endnote Number

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (211 [0xD3])

1	1 byte	Begin subfunction code (3)

2	short	Length (8)

4	short	Old # (no meaning in new values)

6	short	New #

8	short	Length (8)

10	1 byte	End subfunction code (3)

11	1 byte	End function code (211 [0xD3])

Function Code:	211 (0xD3)

Subfunction:	4

Function Name:	Set Page Number

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (211 [0xD3])

1	1 byte	Begin subfunction code (4)

2	short	Length = 10 (0xA) (8 for WP5.0)

4	short	Old page # (no meaning in new values)

6	short	New page # bit 15 = 1 if Roman numerals

8	1 byte	Old page # type added for WP5.1

9	1 byte	New page # type added for WP5.1

0 = Arabic

1 = Roman

10	short	Length = 10 (0xA) (8 for WP5.0)

12	1 byte	End subfunction code (4)

13	1 byte	End function code (211 [0xD3])

Function Code:	211 (0xD3)

Subfunction:	5

Function Name:	Line Numbering

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (211 [0xD3])

1	1 byte	Begin subfunction code (5)

2	short	Length (14 [0xE])

4	1 byte	Old interval (no meaning in new values)

Offset	Size	Meaning

5	short	Old position (no meaning in new values)

7	short	Old starting # (no meaning in new values)

9	1 byte	New interval

bits 0–4 = line numbering interval (1–30)

bit 5 = 1 restart numbering on each page ON

bit 6 = 1 # only text lines ON

bit 7 = 1 line numbering ON

10	short	New position (distance from left edge of paper to
right edge of line # (wpu)

12	short	New starting #

14	short	Length (14 [0xE])

16	1 byte	End subfunction code (5)

17	1 byte	End function code (211 [0xD3])

Function Code:	211 (0xD3)

Subfunction:	6

Function Name:	Advance to Page Position

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (211 [0xD3])

1	1 byte	Begin subfunction code (6)

2	short	Length (9)

4	1 byte	Flags: byte

bit 0 = 0 relative, = 1 absolute

bit 1 = 0 vertical, = 1 horizontal

5	short	Old position (wpu) (no meaning in new values)

7	short	New position (wpu)

9	short	Length (9)

11	1 byte	End subfunction code (6)

12	1 byte	End function code (211 [0xD3])

Function Code:	211 (0xD3)

Subfunction:	7

Function Name:	Force Odd/Even Page

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (211 [0xD3])

1	1 byte	Begin subfunction code (7)

2	short	Length (7)

4	short	Old page #

6	1 byte	Flags: 0 = even, 1 = odd

7	short	Length (7)

9	1 byte	End subfunction code (7)

10	1 byte	End function code (211 [0xD3])

Function Code:	211 (0xD3)

Subfunction:	8

Function Name:	Character at Baseline in Fixed Line Height

added for 6/89 version of WP5.0 and for WP5.1

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (211 [0xD3])

1	1 byte	Begin subfunction code (8)

2	short	Length (6)

4	1 byte	Old def

5	1 byte	New def

6	short	Length (6)

8	1 byte	End subfunction code (8)

9	1 byte	End function code (211 [0xD3])

Function Code:	211 (0xD3)

Subfunction:	9 Reserved

Function Code:	211 (0xD3)

Subfunction:	10 (0xA)

Function Name:	Character/Space Width

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (211 [0xD3])

1	1 byte	Begin subfunction code (10 [0xA])

2	short	Length (12 [0xC])

4	short	Old % of character width (no meaning in new	values)

6	short	Old % of space width (no meaning in new values)

8	short	New % of character width (0% –100%) (normal =	0%)

10	short	New % of space width (0% –100%) (normal = 0%)

12	short	Length (12 [0xC])

14	1 byte	End subfunction code (10 [0xA])

15	1 byte	End function code (211 [0xD3])

Function Code:	211 (0xD3)

Subfunction:	11 (0xB)

Function Name:	Space Expansion

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (211 [0xD3])

1	1 byte	Begin subfunction code (11 [0xB])

2	short	Length (12 [0xC])

4	short	Old minimum % of space width (no meaning in new values)

6	short	Old maximum % of space width (no meaning in new values)

Offset	Size	Meaning

8	short	New minimum % of space width (0 %–100%)

10	short	New maximum % of space width (range 100% –999%, 0 = unlimited)

12	short	Length (12 [0xC])

14	1 byte	End subfunction code (11 [0xB])

15	1 byte	End function code (211 [0xD3])

Function Code:	211 (0xD3)

Subfunction:	12 (0xC)

Function Name:	Set Graphics Box Number for Figures

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (211 [0xD3])

1	1 byte	Begin subfunction code (12 [0xC])

2	short	Length (8)

4	short	Old box # (no meaning in new values)

6	short	New box #

bits 0–4 = 2nd level #

bits 5–15 = 1st level #

8	short	Length (8)

10	1 byte	End subfunction code (12 [0xC])

11	1 byte	End function code (211 [0xD3])

Function Code:	211 (0xD3)

Subfunction:	13 (0xD)

Function Name:	Set Graphics Box Number for Tables

Structure:	See Set Graphics Box Number for Figures

Function Code:	211 (0xD3)

Subfunction:	14 (0xE)

Function Name:	Set Graphics Box Number for Text Boxes

Structure:	See Set Graphics Box Number for Figures

Function Code:	211 (0xD3)

Subfunction:	15 (0xF)

Function Name:	Set Graphics Box Number for User-Defined Boxes

Structure:	See Set Graphics Box Number for Figures

Function Code:	211 (0xD3)

Subfunction:	16 (0x10)

Function Name:	Set Graphics Box Number for Equations added for WP5.1

Structure:	See Set Graphics Box Number for Figures

Function Code:	211 (0xD3)

Subfunction:	17 (0x11)

Function Name:	Set Language

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (211 [0xD3])

1	1 byte	Begin subfunction code (17 [0x11])

2	short	Length (8)

4	2 bytes	Old language 2-char ID (ASCII) (no meaning in new
values)

6	2 bytes	New language 2-char ID (ASCII)

Catalan	CA

Croatian	HR

Czechoslovakian	CZ

Danish	DK

Dutch	NL

English—Australia	OZ

English—U.K.	UK

English—U.S.	US

Finnish	SU

French—Canada	CF

French—France	FR

Galician	GA

German—Germany	DE

German—Switzerland	SD

Greek	GR

Hungarian	MA

Icelandic	IS

Italian	IT

Norwegian	NO

Portuguese—Brazil	BR

Portuguese—Portugal	PO

Russian	RU

Slovak	SL

Spanish	ES

Swedish	SV

Ukrainian	YK

8	short	Length (8)

10	1 byte	End subfunction code (17 [0x11])

11	1 byte	End function code (211 [0xD3])

Function Code:	211 (0xD3)

Subfunction:	18 (0x12)

Function Name:	Set Page Number Style added for WP5.1

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (211 [0xD3])

1	1 byte	Begin subfunction code (18 [0x12])

2	short	Length (64 [0x40])

4	30 bytes	Old page # style

34	30 bytes	New page # style

64	short	Length (64 [0x40])

66	1 byte	End subfunction code (18 [0x12])

67	1 byte	End function code (211 [0xD3])

Function Code:	211 (0xD3)

Subfunction:	19 (0x13)

Function Name:	Set Direction Hebrew/Arabic WP5.1 only

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (211 [0xD3])

1	1 byte	Begin subfunction code (19 [0x13])

2	short	Length (6)

4	1 byte	Old direction

5	1 byte	New direction

bit 0 = left/right

bit 1 = right/left

6	short	Length (6)

8	1 byte	End subfunction code (19 [0x13])

9	1 byte	End function code (211 [0xD3])

Format Group (212 [0xD4])

Function Code:	212 (0xD4)

Subfunction:	0

Function Name:	End of Page Function (only group 0 required)

For WP internal information only. This is part of either a hard page or a soft page and does not need to be created in a WordPerfect file. WordPerfect automatically inserts it.

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (212 [0xD4])

1	1 byte	Begin subfunction code (0)

2	short	Length (variable)

4	1 byte	Group 0 marker

5	1 byte	Group 0 length (26 [0x1A]) modified for WPWin 5.1

6	short	# of formatter lines at end of page

8	short	Actual page # of this page

10	short	# of formatter lines used for footnotes

12	1 byte	# of pages used for footnotes

13	1 byte	# of footnotes on this page

14	1 byte	Conditional end of page flag

15	1 byte	Suppress code

16	1 byte	Center page top to bottom

17	1 byte	Page flags added for WP5.1

18	short	Page length added for WP5.1

20	short	Odd page size added for WP5.1

22	short	Even page size added for WP5.1

24	short	Odd top margin added for WP5.1

26	short	Even top margin added for WP5.1

28	short	# of screen lines at end of page added for WPWin 5.1

30	short	Screen height of last line on page (may include white space for boxes) added for WPWin 5.1

Note:	Include only groups 1 and 2 if you need to supply this information.

32	1 byte	Group 1 marker (optional for columns)

33	1 byte	Group 1 length (variable)

34	# cols-short	Max # formatter lines for each column

..	# cols-short	Max formatter pages for each column

..	# cols-short	Screen line height of last line in column added for WPWin 5.1

Offset	Size	Meaning

..	# cols-short	Max screen lines from Col On for each column added for WP5.1

..	short	Starting formatter lines for last column modified for WP5.1

..	short	Starting page for last column added for WP5.1

..	short	Starting screen line for last column added for WPWin 5.1

..	2 short int.	Screen lines from Col On for last line of last column

..	2 short int.	Screen lines Col On at top of page

..	1 byte	Suppress page state at Col On added for WP5.1

..	short	# of formatter lines used for footnotes at Col On added for WP5.1

..	short	# of pages used for footnotes at Col On added for WP5.1

..	1 byte	Group 2 marker (optional for boxes)

..	short	Group 2 length (variable)

..	1 byte	# of boxes formatter is tracking

..	# boxes*16	Formatter box table (size value=total area of table in bytes)

..	short	Length (variable)

..	1 byte	End subfunction code (0)

..	1 byte	End function code (212 [0xD4])

Note:	The "Fast Save" option of WordPerfect affects the End of Page function code. When the "Fast Save" option is set to "Yes," WordPerfect does not do last-minute formatting of the document before it saves it to disk. Consequently, this function code may not be at the end of a page if "Fast Save" is set to "Yes." If you are creating WordPerfect documents outside of WordPerfect, you do not use this code to indicate the end of page. Use the 12 (0xC) code (see "Single Byte Function Codes").

Function Code:	212 (0xD4)

Subfunction:	1

Function Name:	Beginning of Line Function added for WP5.1

This was the end of the line function in WP5.0. A third party can ignore this function when creating a WordPerfect file. WordPerfect 5.1 automatically inserts this function.

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (212 [0xD4])

1	1 byte	Begin subfunction code (1)

2	short	Length (variable)

4	1 byte	Group 0 marker

5	1 byte	Group 0 length = 6 (4 for WP5.0)

Offset	Size	Meaning

Note:	Group 0 is inserted only if the max values are set and are different from the current values.

6	short	Maximum top shoulder height for the line (wpu)

8	short	Maximum bottom shoulder height for the line (wpu)

10	short	Old # of formatter lines (wpu)

12	short	Maximum screen top shoulder height on line (wpu) added for WPWin 5.1

14	short	Maximum screen bottom shoulder height on line (wpu) added for WPWin 5.1

16	1 byte	Group 1 marker

17	1 byte	Group 1 length (10 [0xA]) modified for WPWin 5.1

Note:	Group 1 is inserted only if FULL JUSTIFY.

18	short	# of spaces on line

20	short	Space adjustment (± amount from margin)

22	short	Justify margin (absolute position to begin justifying)

24	short	Justification printer line width (wpu) added for WPWin 5.1

26	short	Justification screen line width (wpu) added for WPWin 5.1

28	short	Length (variable)

30	1 byte	End subfunction code (1)

31	1 byte	End function code (212)

Function Code:	212 (0xD4)

Subfunction:	2

Function Name:	Graphics Box Information Function

Structure:	Offset	Size	Meaning

1	1 byte	Begin subfunction code (2)

2	short	Length (variable)

Note:	Group 0 and/or Group 1 would be inserted here.

..	short	Length (variable)

..	1 byte	End subfunction code (2)

..	1 byte	End function code (212 [0xD4])

Group 0

4	1 byte	Group 0 marker

5	1 byte	Group 0 length (20 [0x14] for WP5.1, 22 [0x16] for WPWin5.1)

6	short	Old left margin (wpu) (no meaning in new values)

Offset	Size	Meaning

8	short	Old temporary left margin (wpu)

10	short	Old right margin (wpu)

12	short	Old temporary right margin (wpu)

14	short	Old # formatter lines (wpu)

16	short	Old # formatter screen lines (wpu) added for WPWin 5.1

18	short	New left margin (wpu)

20	short	New temporary left margin (wpu)

22	short	New right margin (wpu)

24	short	New temporary right margin (wpu)

26	short	Signed change in new # formatter lines (wpu)

Group 1

4	1 byte	Group 1 marker

5	1 byte	Group 1 length (# boxes *8)

8 bytes for each box affecting line:

6	1 byte	Flags:

bit 0	= 1 top of box falls on this line

bit 1	= 1 middle of box falls on this line

bit 2	= 1 bottom of box falls on this line

bits 3–5 box type

= 0 figure

= 1 table

= 2 text box

= 3 user-defined box

= 4 equation added for WP5.1

bits 6,7 Reserved

7	1 byte	Box numbering mode

8	short	Box # (bits 0 –4: level 2 #, bits 5–15: level 1 #)

10	short	Box position left (wpu)

12	short	Box position right (wpu)

Function Code:	212 (0xD4)

Subfunction:	3

Function Name:	Marker for Repositioning

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (212 [0xD4])

1	1 byte	Begin subfunction code (3)

2	short	Length (6)

4	short	Mask of marker

6	short	Length (6)

8	1 byte	End subfunction code (3)

9	1 byte	End function code (212 [0xD4])

Function Code:	212 (0xD4)

Subfunction:	4

Function Name:	Function to Contain Non-Editable/Displayable Text added for WP5.1

(This function is used to hide additional text in non-wrapping table cells.)

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (212 [0xD4])

1	1 byte	Begin subfunction code (4)

2	short	Length (variable)

4	short	Hash value (reserve with a null, 0)

6	variable	Text

..	short	Length (variable)

..	1 byte	End subfunction code (4)

..	1 byte	End function code (212 [0xD4])

Function Code:	212 (0xD4)

Subfunction:	5

Function Name:	Justification Information added for WP5.1

(Inserted when in center, right, or decimal align justification.)

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (212 [0xD4])

1	1 byte	Begin subfunction code (5)

2	short	Length (8)

4	short	Starting position (screen units)

Note:	There are two possible screen units you can use in offset 4. WP5.1 DOS and the draft screen of WPWin 5.1 use standard column screen units. The WPWin 5.1 normal WYSIWYG editing mode uses units in 1200ths of an inch that are rounded off to the nearest pixel. If you are reading this information, don't trust the value in this field. Use the value in offset 6 for placement information.

6	short	Starting position (wpu)

8	short	Length (8)

10	1 byte	End subfunction code (5)

11	1 byte	End function code (212 [0xD4])

Function Code:	212 (0xD4)

Subfunction:	6

Function Name:	Valid On Marker for Undo added for WPWin 5.1

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (212 [0xD4])

1	1 byte	Begin subfunction code (6)

2	short	Length (10 [0xA])

4	short	Current session date

6	short	Current session time

Offset	Size	Meaning

8	short	Undo level #

10	short	Length (10 [0xA])

12	1 byte	End subfunction code (6)

13	1 byte	End function code (212 [0xD4])

Function Code:	212 (0xD4)

Subfunction:	7

Function Name:	Valid On Marker for Undo added for WPWin 5.1

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (212 [0xD4])

1	1 byte	Begin subfunction code (7)

2	short	Length (10 [0xA])

4	short	Current session date

6	short	Current sessionn time

8	short	Undo level #

10	short	Length (10 [0xA])

12	1 byte	End subfunction code (7)

13	1 byte	End function code (212 [0xD4])

Function Code:	212 (0xD4)

Subfunction:	8

Function Name:	Invalid Function for Undo added for WPWin 5.1

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (212 [0xD4])

1	1 byte	Begin subfunction code (8)

2	short	Length (variable)

4	short	Current session date

6	short	Current session time

8	short	Undo level #

10	short	# of graphics boxes deleted

12	variable	Deleted text or codes

..	short	Length (variable)

..	1 byte	End subfunction code (8)

..	1 byte	End function code (212 [0xD4])

Function Code:	212 (0xD4)

Subfunction:	9

Function Name:	Display Information for Table, Beginning of Row Codes added for WPWin 5.1

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (212 [0xD4])

1	1 byte	Begin subfunction code (9)

2	short	Length (Variable)

Offset	Size	Meaning

4	short	Old row height in screen wpu's

6	short	New row height in screen wpu's

8	short	Number of columns in table

10	Variable	1 long integer for each column in the table

..	short	Length (Variable)

..	1 byte	End subfunction code (9)

..	1 byte	End function code (212 [0xD4])

Function Code:	212 (0xD4)

Subfunction:	14 (0xE)

Function Name:	Data Marker for Intellitag only

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (212 [0xD4])

1	1 byte	Begin subfunction code (14 [0xE])

2	1 short	Length (4)

4	1 short	Length (4)

6	1 byte	End subfunction code (14 [0xE])

7	1 byte	End function code (212 [0xD4])

Header/Footer Group (213 [0xD5])

Function Code:	213 (0xD5)

Subfunction:	0

Function Name:	Header A

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (213 [0xD5])

1	1 byte	Begin subfunction code (0)

2	short	Length (variable)

4	1 byte	Old occurrence flags (old has no meaning in new
values)

5	short	Old # of formatter lines (wpu) (needed)

7	short	Old position of last Header A function (low short
integer)

9	short	Old position of last Header A function (high short integer)

11	1 byte	New occurrence flags:

0 = never (discontinued)

1 = all pages

2 = odd pages

4 = even pages

12	short	New # of formatter lines (wpu)

14	short	New position of last Header A function (not used) (no meaning, can be 0 value)

16	short	New position of last Header A function (not used) (no meaning, can be 0 value)

18	short	# of boxes inside header

20	short	Formatter hash value (no meaning, 0 out)

22	variable	Text of header (include attributes)

..	short	Length (variable)

..	1 byte	End subfunction code (0)

..	1 byte	End function code (213 [0xD5])

Note:	If your program is reading a WordPerfect document and the "new occurence flags" equals 0, offsets 18 through 22 will not exist. This can be detected by checking this function code's length. If you are writing this code into a file, always use the format above.

Function Code:	213 (0xD5)

Subfunction:	1

Function Name:	Header B

Structure:	See Header A Definition

Function Code:	213 (0xD5)

Subfunction:	2

Function Name:	Footer A

Structure:	See Header A Definition

Function Code:	213 (0xD5)

Subfunction:	3

Function Name:	Footer B

Structure:	See Header A Definition

Footnote/Endnote Group (214 [0xD6])

Function Code:	214 (0xD6)

Subfunction:	0

Function Name:	Footnote

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (214 [0xD6])

1	1 byte	Begin subfunction code (0)

2	short	Length (variable)

4	1 byte	Flags:

bits 0–3 # of characters if bit 7 = 1

bit 7 = 0 use numbers, = 1 use characters

5	short	Footnote # or character (depending on bit 7 above)

7	1 byte	# of additional pages in footnote:

0 = 1 page

1 = 2 pages

.. ..

.. ..

8	variable	# of formatter lines for each page of footnotes (wpu)

Note:	Offset 8 is a working space for the WordPerfect formatter. No values are entered into this field, except by the WordPerfect program. However, the size of this field can vary from footnote to footnote. To compute what the size of this field should be for a given footnote, you must find the "number of additional pages." To get this value, add 1 to the value found in offset 7. This becomes the "number of additional pages." Multiplying this number by 2 gives the size, in bytes, of offset 8. For example, if the value of offset 7 is 1, the "number of additional pages" is 1 + 1, or 2, and the size of offset 8 is 2 * 2, or 4 bytes long.

..	short	# of formatter lines on page for footnote (wpu) (document size, excluding footnotes)

..	short	# of footnote lines on page (wpu) (usually Null)

..	1 byte	# of footnote pages on page (usually Null)

..	short	# of graphics boxes inside footnote

..	short	Formatter hash value

..	variable	Text of footnote

..	short	Length (variable)

..	1 byte	End subfunction code (0)

..	1 byte	End function code (214 [0xD6])

Function Code:	214 (0xD6)

Subfunction:	1

Function Name:	Endnote

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (214 [0xD6])

Offset	Size	Meaning

1	1 byte	Begin subfunction code (1)

2	short	Length (variable)

4	1 byte	Flags:

bits 0–3 # of characters if bit 7 = 1

bit 7 = 0 use numbers, = 1 use characters

5	short	Endnote # or character (depending on bit 7 above)

7	short	# of graphics boxes inside endnote

9	short	Formatter hash value

11	variable	Text of endnote

..	short	Length (variable)

..	1 byte	End subfunction code (1)

..	1 byte	End function code (214 [0xD6])

Generate Group (215 [0xD7])

Function Code:	215 (0xD7)

Subfunction:	0

Function Name:	Begin Marked Text

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (215 [0xD7])

1	1 byte	Begin subfunction code (0)

2	short	Length (5)

4	1 byte	Flags:

Low nibble: table of contents level # or list # 0–4

(although a user sees the list as 1–5)

High nibble: 0 = table of contents, 2 = list

5	short	Length (5)

7	1 byte	End subfunction code (0)

8	1 byte	End function code (215 [0xD7])

Function Code:	215 (0xD7)

Subfunction:	1

Function Name:	End Marked Text

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (215 [0xD7])

1	1 byte	Begin subfunction code (1)

2	short	Length (5)

4	1 byte	Flags (same byte set; see Begin Marked Text above)

5	short	Length (5)

7	1 byte	End subfunction code (1)

8	1 byte	End function code (215 [0xD7])

Function Code:	215 (0xD7)

Subfunction:	2

Function Name:	Define Marked Text

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (215 [0xD7])

1	1 byte	Begin subfunction code (2)

2	short	Length (variable)

4	1 byte	Flags:

Low nibble:

For table of contents: level # (0–4)

For index: 0 = no concordance, 1 = concordance

For list: list # (0–4)

For table of authorities: section # (0-15 [0–0xF])

Offset	Size	Meaning

High nibble:

0	=	table of contents

1	=	index

2	=	list

3	=	table of authorities

5	5 bytes	Definition bytes (1 for each level or list)

For table of contents, index and lists:

0	=	no page #s

1	=	page # after text, preceded by two spaces

2	=	page # after text, in parentheses, preceded by one space

3	=	page # flush right

4	=	page # flush right with dot leader

Note:	For index and lists, only the first def byte is significant.

For table of authorities, only the first def byte is significant:

bits: (xxxBxxDU)

B: 1 = insert blank line between authorities

D: 1 = dot leader before page #s

U: 1 = underlining permitted

10	variable	Concordance filename (optional) (if not needed, insert 0 value)

..	short	Length (variable)

..	1 byte	End subfunction code (2)

..	1 byte	End function code (215 [0xD7])

Function Code:	215 (0xD7)

Subfunction:	3

Function Name:	Index Entry

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (215 [0xD7])

1	1 byte	Begin subfunction code (3)

2	short	Length (variable)

4	variable	Heading

..	1 byte	Null separator (always 0)

..	variable	Subheading

Note:	If used, this is a string with no termination character (null or otherwise); if not used, the field does not exist.

..	short	Length (variable)

Offset	Size	Meaning

..	1 byte	End subfunction code (3)

..	1 byte	End function code (215 [0xD7])

Function Code:	215 (0xD7)

Subfunction:	4

Function Name:	Table of Authority Entry

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (215 [0xD7])

1	1 byte	Begin subfunction code (4)

2	short	Length (variable)

4	1 byte	Section # (0–15 [0-0xF] or 32 [0x20])

32 [0x20] = short form only (no full form)

5	variable	Short form

..	1 byte	Null separator (always 0)

..	variable	Long form

..	short	Length (variable)

..	1 byte	End subfunction code (4)

..	1 byte	End function code (215 [0xD7])

Function Code:	215 (0xD7)

Subfunction:	5

Function Name:	Endnotes Print Here

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (215 [0xD7])

1	1 byte	Begin subfunction code (5)

2	short	Length (19 [0x13])

4	short	Old screen column (su) (no meaning in new values)

6	1 byte	# of lines of text to display

7	short	Old # of formatter lines (wpu)

9	short	# of pages in endnote

11	short	# of formatter lines on last page (wpu)

13	short	Position of last "Endnotes Print Here" function

15	short	Position of last "Endnotes Print Here" function

17	short	Old # of endnotes to this point

19	short	Length (19 [0x13])

21	1 byte	End subfunction code (5)

22	1 byte	End function code (215 [0xD7])

Function Code:	215 (0xD7)

Subfunction:	6

Function Name:	Save Page Information (Internal WordPerfect function used only during generate to remember endnote page information. All values are the current settings at the place where the endnote prints in the document.)

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (215 [0xD7])

1	1 byte	Begin subfunction code (6)

2	short	Length (13 [0xD])

4	short	# of formatter lines (wpu)

6	short	Page #

8	short	Page length for odd pages (wpu)

10	short	Page length for even pages (wpu)

12	1 byte	Page numbering style (0 = numeric, 1 = Arabic)

13	short	Length (13 [0xD])

15	1 byte	End subfunction code (6)

16	1 byte	End function code (215 [0xD7])

Function Code:	215 (0xD7)

Subfunction:	7

Function Name:	Auto Reference Definition

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (215 [0xD7])

1	1 byte	Begin subfunction code (7)

2	short	Length (variable)

4	1 byte	Type of reference:

0 = page #

1 = paragraph #

2 = footnote #

3 = endnote #

4 = figure #

5 = table #

6 = text box #

7 = user-defined box #

8 = equation box # added for WP5.1

5	variable	Tag ID text (same as tag ID in auto reference tag, sub 8)

..	1 byte	Null separator (always 0)

..	variable	Text of # being referenced (no null terminator)

..	short	Length (variable)

..	1 byte	End subfunction code (7)

..	1 byte	End function code (215 [0xD7])

Function Code:	215 (0xD7)

Subfunction:	8

Function Name:	Auto Reference Tag

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (215 [0xD7])

1	1 byte	Begin subfunction code (8)

2	short	Length (variable)

4	variable	Tag ID text (same as auto reference definition, sub 7)

..	1 byte	Null terminator (always 0)

..	short	Length (variable)

..	1 byte	End subfunction code (8)

..	1 byte	End function code (215 [0xD7])

Function Code: 215 (0xD7)

Subfunction:	9

Function Name:	Include Subdocument

(This function contains the filename of a subdocument to be included, along with the number of lines to display—displays as a comment.)

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (215 [0xD7])

1	1 byte	Begin subfunction code (9)

2	short	Length (variable)

4	short	Old screen column (su)

6	1 byte	# of lines of text to display

7	variable	Filename (null terminated)

..	short	Length (variable)

..	1 byte	End subfunction code (9)

..	1 byte	End function code (215 [0xD7])

Function Code:	215 (0xD7)

Subfunction:	10 (0xA)

Function Name:	Start of Included Subdocument

(This function contains the subdocument filename that has been retrieved into a master document.)

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (215 [0xD7])

1	1 byte	Begin subfunction code (10 [0xA])

2	short	Length (variable)

4	short	Old screen column (su)

6	1 byte	# of lines of text to display

7	variable	Filename (null terminated)

..	variable	Reserved (set to 0)

..	short	Length (variable)

..	1 byte	End subfunction code (10 [0xA])

..	1 byte	End function code (215 [0xD7])

Function Code:	215 (0xD7)

Subfunction:	11 (0xB)

Function Name:	End of Included Subdocument

(This function contains the subdocument filename that has been retrieved into a master document.)

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (215 [0xD7])

1	1 byte	Begin subfunction code (11 [0xB])

2	short	Length (variable)

4	short	Old screen column (su)

6	1 byte	# of lines of text to display

7	variable	Filename (null terminated)

..	short	Length (variable)

..	1 byte	End subfunction code (11 [0xB])

..	1 byte	End function code (215 [0xD7])

Function Code:	215 (0xD7)

Subfunction:	12 (0xC)

Function Name:	VAX Path/Packetized File Names (Added for WP5.1 VAX only)

(This function contains the filename in the VAX syntax; or, if the document is from a VAX with TeamLinks, it will have a packetized filename. It can be nested in the Figure Group 218 [0xDA] function code, or after any of the Chain or Nest merge function codes in the 222 [0xDE] group.)

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (215 [0xD7])

1	1 byte	Begin subfunction code (12 [0xC])

2	short	Length (variable)

4	short	Old screen column (su)

6	1 byte	# of lines of text to display

7	variable	Filename (Null-terminated ASCII string in VAX syntax, or packetized TeamLinks file information beginning with -1 (0xFF),"WPF"

..	short	Length (variable)

..	1 byte	End subfunction code (12 [0xC])

..	1 byte	End function code (215 [0xD7])

Note:	On WP5.1 VAX, this function code works in a similar way to the "Include Subdocument" (215 [0xD7], 9) function code. It produces a comment code with the path information in it.

Display Group (216 [0xD8])

Function Code:	216 (0xD8)

Subfunction:	0

Function Name:	Date Function

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (216 [0xD8])

1	1 byte	Begin subfunction code (0)

2	short	Length (variable)

4	variable	†Date format string

..	short	Length (variable)

..	1 byte	End subfunction code (0)

..	1 byte	End function code (216 [0xD8])

†Date Format

Character	Meaning

1	Day of the Month

2	Month (number)

3	Month (word)

4	Year (all four digits)

5	Year (last two digits)

6	Day of the Week

7	Hour (24-hour clock)

8	Hour (12-hour clock)

9	Minute

0	am / pm

%,$	Used before a number, % will pad numbers less than 10 with a leading zero or space , and $ will abbreviate the month or day of the week

Examples:	3 1, 4 = December 25, 1984

%6 %3 1, 4 = Tue Dec 25, 1984

%2/%1/5 (6) = 01/01/85 (Tuesday)

$2/$1/5 (%6) = 1/ 1/85 (Tue)

8:90 = 10:55am

Function Code:	216 (0xD8)

Subfunction:	1

Function Name:	Paragraph Number

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (216 [0xD8])

1	1 byte	Begin subfunction code (1)

2	short	Length (variable)

4	1 byte	New level #

bits 0–6 level #

Offset	Size	Meaning

bit 7 = 1 level # is fixed

5	8 short int.	Old 8 level #s

21	variable	WordPerfect format, text of marked paragraph # for display and printer

..	short	Length (variable)

..	1 byte	End subfunction code (1)

..	1 byte	End function code (216 [0xD8])

Function Code:	216 (0xD8)

Subfunction:	2

Function Name:	Overstrike

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (216 [0xD8])

1	1 byte	Begin subfunction code (2)

2	short	Length (variable)

4	short	Maximum character width (su)

6	variable	Characters to overstrike (functions that may be in the character string: extended char, attributes)

..	short	Length (variable)

..	1 byte	End subfunction code (2)

..	1 byte	End function code (216 [0xD8])

Function Code:	216 (0xD8)

Subfunction:	3

Function Name:	Page Number Style Insert added for WP5.1

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (216 [0xD8])

1	1 byte	Begin subfunction code (3)

2	short	Length (variable)

4	variable	Style string (in bytes)

..	short	Length (variable)

..	1 byte	End subfunction code (3)

..	1 byte	End function code (216 [0xD8])

Miscellaneous Group (217 [0xD9])

Function Code:	217 (0xD9)

Subfunction: 0

Function Name:	Embedded Printer Command

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (217 [0xD9])

1	1 byte	Begin subfunction code (0)

2	short	Length (variable)

4	1 byte	Flags: 0 = command, 1 = filename

5	variable	Filename or WordPerfect printer command string

..	short	Length (variable)

..	1 byte	End subfunction code (0)

..	1 byte	End function code (217 [0xD9])

Function Code:	217 (0xD9)

Subfunction: 1

Function Name:	Conditional End of Page Function

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (217 [0xD9])

1	1 byte	Begin subfunction code (1)

2	short	Length (5)

4	1 byte	# of single-spaced lines to keep together

5	short	Length (5)

7	1 byte	End subfunction code (1)

8	1 byte	End function code (217 [0xD9])

Function Code:	217 (0xD9)

Subfunction:	2

Function Name:	Comment

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (217 [0xD9])

1	1 byte	Begin subfunction code (2)

2	short	Length (variable)

4	short	Old screen column (su)

6	1 byte	# of lines of text to display (lines used inside of comment box only)

7	variable	Text of comment

..	short	Length (variable)

..	1 byte	End subfunction code (2)

..	1 byte	End function code (217 [0xD9])

Function Code:	217 (0xD9)

Subfunction:	3

Function Name:	Kerning (Text)

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (217 [0xD9])

1	1 byte	Begin subfunction code (3)

2	short	Length (6)

4	1 byte	Old kerning value (0 = OFF, 1 = ON)

(assumed OFF)

5	1 byte	New kerning value

6	short	Length (6)

8	1 byte	End subfunction code (3)

9	1 byte	End function code (217 [0xD9])

Function Code:	217 (0xD9)

Subfunction:	4

Function Name:	Outline On added for WP5.1

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (217 [0xD9])

1	1 byte	Begin subfunction code (4)

2	short	Length (20 [0x14])

4	8 short int.	Old level #s for paragraph numbering

20	short	Length (20 [0x14])

22	1 byte	End subfunction code (4)

23	1 byte	End function code (217 [0xD9])

Function Code:	217 (0xD9)

Subfunction:	5

Function Name:	Leading Adjustment added for WP5.1

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (217 [0xD9])

1	1 byte	Begin subfunction code (5)

2	short	Length (12 [0xC])

4	2 short int.	Old [SRt] and [HRt] leading (wpu)

8	2 short int.	New [SRt] and [HRt] leading (wpu)

12	short	Length (12 [0xC])

14	1 byte	End subfunction code (5)

15	1 byte	End function code (217 [0xD9])

Function Code:	217 (0xD9)

Subfunction:	6

Function Name:	Kerning (Graphics Text)

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (217 [0xD9])

1	1 byte	Begin subfunction code (6)

2	short	Length (6)

4	short	Kerning value (kv), where:

(100/kv) * (width of a space char) = desired kern

6	short	Length (6)

8	1 byte	End subfunction code (6)

9	1 byte	End function code (217 [0xD9])

Function Code:	217 (0xD9)

Subfunction:	7

Function Name:	Hide Function

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (217 [0xD9])

1	1 byte	Begin subfunction code (7)

2	short	Length (variable)

4	4 bytes	Product type, File type, Major version, Minor
version

8	variable	Variable length information to be hidden from WordPerfect, but to be preserved for subsequent format conversions

..	short	Length (variable)

..	1 byte	End subfunction code (7)

..	1 byte	End function code (217 [0xD9])

Function Code:	217 (0xD9)

Subfunction:	8

Function Name:	Macro added for WPWin 5.1

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (217 [0xD9])

1	1 byte	Begin subfunction code (8)

2	short	Length (variable)

Note:	This function is used to "hide" function codes embedded in macro/token parameter strings.

..	short	Length (variable)

..	1 byte	End subfunction code (8)

..	1 byte	End function code (217 [0xD9])

Box Group (218 [0xDA])

Function Code:	218 (0xDA)

Subfunction:	0

Function Name:	Figure

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (218 [0xDA])

1	1 byte	Begin subfunction code (0)

2	short	Length (variable)

4	short	Box # (bits 0–4 level 2 #, bits 5–15 level 1 #)

6	1 byte	Position and type flags:

bits 0,1 box type

=	0 paragraph

=	1 page

=	2 character (in-line)

bits 2–4 page position option

=	0 full page

=	1 top

=	2 middle

=	3 bottom

=	4 absolute

bit 5	=	1 box is bumped to next page

bit 6	=	0 not offset

=	1 page offset appears after page defined on added for WP5.1

bit 7 print equation as text or graphic flag added for WP5.1

=	0 print as graphics

=	1 print as text

7	1 byte	Alignment flags:

bits 0,1 alignment option

=	0 left

=	1 right

=	2 centered

=	3 left and right (justified)

bits 2,3 aligned with

=	0 margin

=	1 columns X–Y

=	2 absolute

bit 4	=	0 scale height to figure, = 1 fixed height

bit 5	=	0 scale width to figure, = 1 fixed width

bit 6 reserved

bit 7	=	0 wrap text around box, = 1 do not wrap

Offset	Size	Meaning

8	short	Width of box (wpu) (calculated)

10	short	Height of box (wpu) (calculated)

12	short	X position of box (wpu) (calculated)

14	short	Y position of box (wpu) (calculated)

Note:	Insert 0 values to use WordPerfect defaults. WordPerfect will calculate the wpu.

16	short	Outside left spacing between window and text (wpu)

18	short	Outside right spacing between window and text (wpu)

20	short	Outside top spacing between window and text (wpu)

22	short	Outside bottom spacing between window and text (wpu)

24	short	Inside left spacing between window and image (wpu)

26	short	Inside right spacing between window and image (wpu)

28	short	Inside top spacing between window and image (wpu)

30	short	Inside bottom spacing between window and image (wpu)

32	short	Horizontal offset (wpu)

34	short	Vertical offset (wpu)

36	1 byte	Column X for column alignment

37	1 byte	Column Y for column alignment

38	short	Source image width (wpu)

40	short	Source image height (wpu) for text boxes = # formatter lines of text (wpu) (size of text)

42	short	Orientation bits 0–11 angle of rotation (0–0–360 [0x168]) bits 12,13 reserved bit 14 = 1 invert bits for monochrome bitmaps bit 15 = 1 mirror

44	short	Width scale factor (100 [0x64] = 100%)

46	short	Height scale factor (100 [0x64] = 100%)

48	short	X crop offset (wpu) (for cropping)

for text boxes = formatter hash value

50	short	Y crop offset (wpu) (for cropping)

for text boxes = rotation

0 = 0 degrees

1 = 90 degrees (text from bottom to top)

2 = 180 degrees (text upside down)

3 = 270 degrees (text from top to bottom)

52	1 byte	Format type box contents modified for WP5.1

Offset	Size	Meaning

0	=	Empty box

2	=	Graphics on disk

8	=	Equation text (WP format) added for WP5.1

16 (0x10) = Text (WordPerfect format)

17 (0x11) = Text (ASCII format)

64 (0x40) = Internal table format

65 (0x41) = MathPlan 3.0 worksheet

66 (0x42) = Lotus 1–2–3 worksheet

67 (0x43) = DIF format

128 (0x80) = .WPG format

129 (0x81) = Lotus .PIC format

130 (0x82) = TIFF format

131 (0x83) = PC Paintbrush .PCX/.PCC format

132 (0x84) = Windows Paint (.MSP) format

133 (0x85) = CGI Metafile (.CGM) format

134 (0x86) = AutoCAD format (DXF) format

137 (0x89) = Mac PNTG file (MacPaint)

138 (0x8A) = HPGL format

139 (0x8B) = Dr. Halo and Halo DPE format

140 (0x8C) = PC Paint normal format

141 (0x8D) = PC Paint BSAVE format

142 (0x8E) = Gem .IMG format

143 (0x8F) = Encapsulated PostScript files

144 (0x90) = PostScript files

145 (0x91) = SIXEL format or Dr. Halo II (.PIC) format

146 (0x92) = ReGIS format

147 (0x93) = Tektronix 401x format

148 - 255 (0x94-0xFF) Reserved

53	21 bytes	Source filename (ASCII, null terminated)

74	12 bytes	Reserved, insert 0 value (WP5.0 = 33 bytes)

86	1 word	Non-zero indicates OLE Object modified for WPWIN 5.2

88	5 bytes	Reserved

93	1 byte	Platform (always 255 [0xFF] for Unix and zero for all others) added for WP5.1, 5.2+, 7C Unix only

94	long	Active pointer to graphic added for WP5.1, 5.2+, 7C Unix only

98	long	Time stamp for graphic (in UNIX time) added for WP5.1, 5.2+, 7C Unix only

Note:	The pointer in offset 94 is only valid if the time stamp in offset 98 is current. Since the only time that the time stamp is current is when the document is in WP, offset 94 is invalid when the file is read external to WP.

102	1 byte	Justification flags for equations added for WP5.1

0 = center

1 = left

2 = right

103	short	Absolute page # box appears on (def. page + bumped + page offset) added for WP5.1

105	1 byte	# of pages the box is bumped from the page it is defined on added for WP5.1

106	1 byte	# of pages the page type box is offset from the page it is defined on added for WP5.1

107	short	Desired width, as entered by user (wpu)

109	short	Desired height, as entered by user (wpu)

111	short	Amount of extra space between caption and box (wpu)

113	short	Image index # in graphics temp file (can use 0 value)

115	short	# of formatter lines in caption (wpu)

117	short	Formatter hash value for caption (insert 0 value)

119	short	Length of caption (in bytes)

121	variable	Text for caption (if any, may contain Function 212 [0xD4], subfun. 1)

Note:	Insert equation formulas here. You must use the Equation Nested Function Group (223 [0xDF]).

..	variable	Text for text box (if any)

..	short	Length (variable)

..	1 byte	End subfunction code (0)

..	1 byte	End function code (218 [0xDA])

Function Code:	218 (0xDA)

Subfunction:	1

Function Name:	Table

Structure:	See definition for Figure

Function Code:	218 (0xDA)

Subfunction:	2

Function Name:	Text Box

Structure:	See definition for Figure

Function Code:	218 (0xDA)

Subfunction:	3

Function Name:	User-Defined Box

Structure:	See definition for Figure

Function Code:	218 (0xDA)

Subfunction:	4

Function Name:	Equation added for WP5.1

Structure:	See definition for Figure

Function Code:	218 (0xDA)

Subfunction:	5

Function Name:	Horizontal Line

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (218 [0xDA])

1	1 byte	Begin subfunction code (5)

2	short	Length (121 [0x79])

4	short	Reserved

6	1 byte	Vertical position flags:

bits 0,1 reserved

bits 2–4 position option for lines

For vertical lines:

=	0 full page (default)

=	1 top

=	2 middle

=	3 bottom

=	4 absolute

For horizontal lines: added for WP5.1

=	0 baseline (default)

=	1 not used

=	2 not used

=	3 not used

=	4 absolute

bit 5	=	1 bump bit (must = 0)

bits 6,7 reserved

7	1 byte	Flags: alignment

bits 0–2 alignment option

For horizontal lines:

=	0 left

=	1 right

=	2 centered

=	3 left and right (justified)

=	4 absolute position

Offset	Size	Meaning

For vertical lines:

=	0 left margin

=	1 right margin

=	2 between columns X and X+1

=	3 absolute position

bits 3–7 reserved

8	short	Width of line (wpu)

10	short	Height of line (wpu)

12	short	X position of line (wpu)

14	short	Y position of line (wpu)

16	20 bytes	Reserved

36	1 byte	Shading (% of black)

37	1 byte	Column X (only for vertical lines that follow
column)

38	4 bytes	Reserved

42	short	Reserved (must = 0)

44	short	Width scale factor (must = 100 [0x64])

46	short	Height scale factor (must = 100 [0x64])

48	short	Reserved (must = 0)

50	short	Reserved (must = 0)

52	1 byte	Reserved (must = 0)

53	50 bytes	Reserved

103	short	Appearance page added for WP5.1

105	14 bytes	Reserved

Note:	In WP5.0, offset 53 has a size of 66 bytes, and offsets 103 and 105 do not exist.

119	short	Reserved (must = 0)

121	short	Length (121 [0x79])

123	1 byte	End subfunction code (5)

124	1 byte	End function code (218 [0xDA])

Function Code:	218 (0xDA)

Subfunction:	6

Function Name:	Vertical Line

Structure:	See definition for Horizontal Line

Style Group (219 [0xDB])

Note:	Start Definition functions tell WP what style packet to look into for a given style's contents (see Packet Type--Styles 256-511 (0x100-0x1FF). The codes in that packet are inserted by WP, between the Start Definition function and the End Style Definition function. After the End Style Definition function, the text to be affected by the style is put in. If you are creating a document external to WP, you must have defined the style into the prefix of the document or through WP's Style library options. To use the style, you must use one of the Start Definition functions, followed by the End Style Definition. WP will fill in the information between the two codes. Then, insert the text to be affected by the style after the End Style Definition.

Function Code:	219 (0xDB)

Subfunction:	0

Function Name:	Begin Paired Style ON (start definition)

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (219 [0xDB])

1	1 byte	Begin subfunction code (0)

2	short	Length (variable)

4	short	Old file position of Begin ON (low) (reserve with 0)

6	short	Old file position of Begin ON (high) (reserve with 0)

8	short	Old formatter hash value

10	1 byte	Old hard return type code

11	1 byte	Old unique style #

12	1 byte	New hard return type code

13	1 byte	New unique style #

14	short	Formatter hash value for text in style

†	16	variable	Style Name, null terminated string

(maximum size is 21 bytes, with null. Only first 12 characters will be displayed In WP)

..	short	Length (variable)

..	1 byte	End subfunction code (0)

..	1 byte	End function code (219 [0xDB])

Function Code:	219 (0xDB)

Subfunction:	1

Function Name:	End Paired Style ON (start definition)

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (219 [0xDB])

1	1 byte	Begin subfunction code (1)

2	short	Length (variable)

4	short	Old file position of Begin ON (low) (reserve with 0)

6	short	Old file position of Begin ON (high) (reserve with 0)

8	short	Old formatter hash value at Begin

Offset	Size	Meaning

10	1 byte	Old hard return type code

11	1 byte	Old unique style #

12	short	New file position of Begin ON (low) (reserve with 0)

14	short	New file position of Begin ON (high) (reserve with 0)

16	short	New formatter hash of old values

18	1 byte	New hard return type code

19	1 byte	New unique style #

20	short	Formatter hash value for text in end style

†	22	variable	Style Name, null terminated string

(maximum size is 21 bytes, with null. Only first 12 characters will be displayed In WP)

..	short	Length (variable)

..	1 byte	End subfunction code (1)

..	1 byte	End function code (219 [0xDB])

Function Code:	219 (0xDB)

Subfunction:	2

Function Name:	Open, Global Style (start definition)

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (219 [0xDB])

1	1 byte	Begin subfunction code (2)

2	short	Length (variable)

4	1 byte	Unique style #

5	short	Formatter hash value for text in style

†	7	variable	Style Name, null terminated string

(maximum size is 21 bytes, with null. Only first 12 characters will be displayed In WP)

..	short	Length (variable)

..	1 byte	End subfunction code (2)

..	1 byte	End function code (219 [0xDB])

Function Code:	219 (0xDB)

Subfunction:	3

Function Name:	End Style Definition

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (219 [0xDB])

1	1 byte	Begin subfunction code (3)

2	short	Length (5)

4	1 byte	Flag: 1 = text was modified by formatter

5	short	Length (5)

7	1 byte	End subfunction code (3)

8	1 byte	End function code (219 [0xDB])

†	In all styles except Outline, the style name begins at the first byte of offset 16. In Outline style, the first three bytes contain 127 (0x7F), "a," nn, where nn is an ASCII number representing the level number in the outline.

Table End of Line Codes Group (220 [0xDC])

Function Code:	220 (0xDC) added for WP5.1

Subfunction:	0

Function Name:	Beginning of Column (Cell) at End of Line

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (220 [0xDC])

1	1 byte	Begin subfunction code (0)

2	short	Length (variable)

4	1 byte	Flags:

bit 0	=	1 use cell justification instead of column defaults

bit 1	=	1 use cell attributes instead of column defaults

bits 2,3 vertical alignment of cell

=	0 top

=	1 bottom

=	2 center

bit 4	=	1 text type, = 0 numeric type

bit 5	=	1 cell has a formula

bit 6	=	1 cell is locked

bit 7 available (0 for now)

5	1 byte	Column # (0 origin)

6	1 byte	Column-spanning information

bits 0–5 # of columns this cell spans

bit 6 available

bit 7	=	1 cell continues from row above

7	1 byte	Row-spanning information (# of rows this cell spans)

8	short	Old max # formatter lines for row (wpu)

10	short	Old max # screen lines for row (screen units)

12	short	Cell attributes (if bit above is set to not use column attributes)

Attributes correspond to the bit that is set, as described below:

1	=	extra large

2	= very large

4	= large

8	= small

16 (0x10)	= fine

32 (0x20)	= superscript

64 (0x40)	= subscript

128 (0x80)	= outline

256 (0x100)	= italics

Offset	Size	Meaning

512 (0x200)	= shadow

1024 (0x400)	= redline

2048 (0x800)	= double underline

4096 (0x1000)	= bold

8192 (0x2000)	= strikeout

16384 (0x4000)	= underline

32768 (0x8000)	= small caps

14	1 byte	Cell justification (if bit above is set to not use column justification)

bits 0–2 horizontal justification for cell

= 0 left

= 1 justified (left and right)

= 2 center

= 3 flush right

= 4 decimal align

= 5–7 available

bits 3–7 available

15	variable	Variable length subgroup information

(if function length = 15 [0xF], no subgroups exist)

..	1 byte	Subgroup code

Currently, the only valid subgroup is:

1 = cell formula

..	variable	Subgroup (max len = 255 [0xFF])

Note:	The format is the same as Math Columns (see Function 210 (0xD2), subfunction 0). Besides math formulas, cell data positions are given. These cell positions are signed values giving the relative position of the data cell from the cell containing this formula. The cell position has the following formula:

1byte:	166 (0xA6) signals start of a cell position

short integer:	± number of cells from formula cell. (In rows, + = up and - = down)

short integer:	± number of cells from formula cell. (In columns, + = right and - = left)

If the data cell is in the same row or column as the formula cell, the value in that field would be zero.

..	short	Length (variable)

..	1 byte	End subfunction code (0)

..	1 byte	End function code (220 [0xDC])

Function Code:	220 (0xDC) added for WP5.1

Subfunction:	1

Function Name:	Beginning of Row at End of Line

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (220 [0xDC])

1	1 byte	Begin subfunction code (1)

2	short	Length (variable)

4	1 byte	Old row height flags:

bit 0	= 0 single line of text (no wrap)

= 1 multi-line text (wrapping)

bit 1	= 0 fixed height

= 1 auto height

bits 2–7 available

5	short	Old row height (wpu)

7	1 byte	Old # of bytes of border information for this row

If high bit = 1, short integer per column (newer format)

If high bit = 0, 1 byte per column (pre-release WP5.1 format—the formatter converts these to the newer format when found)

8	variable	Old: border information (# columns * 2 bytes at most)

..	1 word per column border style or count word for compression:

bits 0–2 def for top border of cell

bits 3–5 def for left border of cell

bits 6,7 available

bits 8–10 def for bottom border of cell

bits 11–13 def for right border of cell

bit 14 = 1 if shaded cell

bit 15 = 1 if this word is a count word

Note:	This indicates that the border style in the next word applies to # columns where # is stored in bits 0–14. This allows a compressed storage of border definitions. For example, if the word value is 800Ah, then this is a count value because bit 15 is set. Bits 0-14 hold the value of 10 (0xA), which is the number of consecutive columns in the table that have the border definitions of the next word.

1 byte per cell border style: (pre-release WP5.1)

bits 0–2 top border style for cell

bits 3–5 left border for cell

bit 6	=	1 shaded cell

bit 7	=	1 same as bit 7 above, except the value is in bits 0-6.

Offset	Size	Meaning

Note: Right and bottom borders are assumed to be zero (0). Last byte is assumed to be the right border.

Values for cell border styles (at offset 8):

0 = none

1 = single

2 = double

3 = dashed

4 = dotted

5 = thick

6 = extra thick

..	1 byte	New row height flags

..	short	New row height (wpu)

..	1 byte	New # of bytes of border information

..	variable	New border information

..	short	Old # of formatter lines at top of row (wpu)

..	short	Length word (variable)

..	1 byte	End subfunction code (1)

..	1 byte	End function code (220 [0xDC])

Function Code:	220 (0xDC) added for WP5.1

Subfunction:	2

Function Name:	Table Off at End of Line

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (220 [0xDC])

1	1 byte	Begin subfunction code (2)

2	short	Length (variable)

4	1 byte	Flags:

bits 0–1 old row height option flags

bits 2–7 reserved

5	short	Old row height (wpu)

7	1 byte	Old # of bytes of border information for row

bits 0–6	the # of bytes of border information that follow.

bit 7	=	0 one byte for each border definition (prerelease WP5.1)

=	1 one short integer for each border definition

8	variable	Old border information for row

Note:	Border information may be in a compressed format. If bit 15 of a border definition is set, the short integer is a count integer, and bits 0–14 specify how many times to repeat the border definition that follows this count. The next short integer is the actual border definition to repeat.

Offset	Size	Meaning

..	short	Old # rows (# row of last row in table (0 origin)

..	short	Old # formatter lines at top of row (wpu)

..	short	Old size of header rows (wpu)

..	1 byte	Old # of columns

..	short	Old row height (screen units) added for WPWin 5.1
(For tables created with pre-beta and first beta of WP5.1: the # of bytes of bottom border information followed here, together with the variable length bottom border information.)

Size = 13 bytes + row border information modified for WPWin 5.1

(max = 13 + 64)

..	short	Length (variable)

..	1 byte	End subfunction code (2)

..	1 byte	End function code (220 [0xDC])

Function Code:	220 (0xDC)

Subfunction:	3 Reserved

Table End of Page Codes Group (221 [0xDD])

Function Code:	221 (0xDD)

Subfunction:	0 Reserved

Function Code:	221 (0xDD) added for WP5.1

Subfunction:	1

Function Name:	Beginning of Row at End of Page

Structure:	See Beginning of Row at End of Line

Function Code:	221 (0xDD) added for WP5.1

Subfunction:	2

Function Name:	Table Off at End of Page

Structure:	See Table Off at End of Line

Function Code:	221 (0xDD) added for WP5.1

Subfunction:	3

Function Name:	Beginning of Row/Hard Page Break

Structure:	See Beginning of Row at End of Line

Enhanced Merge Command Codes Group (222 [0xDE])

Function Code:	222 (0xDE) added for WP5.1

Subfunction:	32–99 (0x20–0x63)

Function Name:	Enhanced Merge Command Codes

Structure:	Enhanced Merge Command Codes Group (222 [0xDE])

Length equals 4 unless specified otherwise.

Note:	Entire function = <function code><subfunction code><length><length><subfunction code><function code>, where "subfunction code" is one of the following "Subfunction Values." For example, the following is the structure of the {END FIELD} and {END RECORD} codes.

End Field Code	End Record Code

Function:	222 (0xDE)	Function:	222 (0xDE)

Subfunction:	49 (0x31)	Subfunction:	52 (0x34)

Length:	4	Length:	6

Length:	4	# of Fields:	variable

Subfunction:	49 (0x31)	Length:	6

Function:	222 (0xDE)	SubFunction:	52 (0x34)

Function:	222 (0xDE)

Value	Meaning

32 (0x20)	{ASSIGN}var~expr~

33 (0x21)	{BELL}

34 (0x22)	{BREAK}

35 (0x23)	{CALL}label~

36 (0x24)	{CANCEL OFF}

37 (0x25)	{CANCEL ON}

38 (0x26)	{CASE}exp~case1~label~...~{ELSE}~label~~

39 (0x27)	{CASE CALL}exp~case1~label~...~{ELSE}~label~~

40 (0x28)	{CHAIN MACRO}macroname~ (Old ^G)

41 (0x29)	{CHAIN PRIMARY}filename~

42 (0x2A)	{CHAIN SECONDARY}filename~

43 (0x2B)	{CHAR}var~message~

44 (0x2C)	{COMMENT}comment~

45 (0x2D)	{CTON}character~

46 (0x2E)	{DATE} (Old ^D)

47 (0x2F)	{DOCUMENT}filename~

48 (0x30)	{ELSE}

49 (0x31)	{END FIELD}Old ^R

50 (0x32)	{END FOR}

51 (0x33)	{END IF}

Value	Meaning

52 (0x34)	{END RECORD} Old ^E. Length (6) # of fields in record (short integer)

53 (0x35)	{END WHILE}

54 (0x36)	{FIELD}field~ Old ^F

55 (0x37)	{FOR}var~start~stop~step~

56 (0x38)	{FOR EACH}var~expr~expr~...~~

57 (0x39)	{GO}label~

58 (0x3A)	{IF}expr~

59 (0x3B)	{IF BLANK}field~

60 (0x3C)	{IF EXISTS}var~

61 (0x3D)	{IF NOT BLANK}field~

62 (0x3E)	{KEYBOARD} (Old ^C)

63 (0x3F)	{LABEL}label~

64 (0x40)	{LOCAL}var~expr~

65 (0x41)	{LOOK}var~

66 (0x42)	{MID}expr~offset~count~

67 (0x43)	{MRG CMND}codes{MRG CMND} (Old ^V)

68 (0x44)	{NEST MACRO}macroname~

69 (0x45)	{NEST PRIMARY}filename~ (Old ^P)

70 (0x46)	{NEST SECONDARY}filename~

71 (0x47)	{NEXT}

72 (0x48)	{NEXT RECORD} (Old ^N)

73 (0x49)	{NTOC}number~

74 (0x4A)	{PROCESS}codes{PROCESS}

75 (0x4B)	{ON CANCEL}action~

76 (0x4C)	{ON ERROR}action~

77 (0x4D)	{PAGE OFF}

78 (0x4E)	{PAGE ON} mrg_prnt

79 (0x4F)	(Old ^T)

80 (0x50)	{PROMPT}message~ (Old ^O)

81 (0x51)	{QUIT} (Old ^Q)

82 (0x52)	{RETURN}

83 (0x53)	{RETURN CANCEL}

84 (0x54)	{RETURN ERROR}

85 (0x55)	{REWRITE} (Old ^U)

86 (0x56)	{STEP OFF}

87 (0x57)	{STEP ON}

88 (0x58)	{SUBST PRIMARY}filename~

89 (0x59)	{SUBST SECONDARY}filename~ (Old ^S)

90 (0x5A)	{SYSTEM}sysvar~

91 (0x5B)	{TEXT}var~message~

92 (0x5C)	{VARIABLE}var~

93 (0x5D)	{WAIT}10ths~

94 (0x5E)	{WHILE}expr~

Value	Meaning

95 (0x5F)	{STATUS PROMPT}message~

96 (0x60)	{INPUT}message~

97 (0x61)	{LEN}expr~

98 (0x62)	{FIELD NAME}name1~...~nameN~~ mrg_end

99 (0x63)	End of merge commands (include for new commands)

Equation Nested Function Group (223 [0xDF])

Function Code:	223 (0xDF)

Subfunction:	0

Function Name:	Equation Nested Function added for WP5.1

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (223 [0xDF])

1	1 byte	Begin subfunction code (0)

2	short	Length (variable)

4	short	Flags:

bits 0–2 horizontal alignment

= 0 left alignment

= 1 right alignment

= 2 center alignment

bits 3–5 vertical alignment

= 1 top alignment

= 2 center alignment

= 3 bottom alignment

bits 6–15 reserved

6	short	Equation base font size (for graphics)

8	short	Offset from this location of equation text (0 in WP5.1)

10	short	Length of equation text

12	variable	Equation text

..	variable	Equation compact stream

..	short	Function length (variable)

..	1 byte	Byte subfunction (0)

..	1 byte	Byte function (223 [0xDF])

Tag Group (225 0xE1)

Function Code:	225 (0xE1)

Subfunction:	0

Function Name:	Start Tag for Intellitag only

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (225 [0xE1])

1	1 byte	Begin subfunction code (0)

2	1 short	Length

4	1 byte	Number of attributes

6	1 short	Tag DTD index number

8	33 bytes max	Tag name (null terminated)

..	variable	n attribute text strings where n = # of attributes. Each attribute string may consist of regular characters or extended characters. Each string is null terminated.

..	1 short	Length

..	1 byte	End subfunction code (0)

..	1 byte	End function code (225 [0xE1]

Function Code:	225 (0xE1)

Subfunction:	1

Function Name:	End Tag for Intellitag only

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (225 [0xE1])

1	1 byte	Begin subfunction code (1)

2	1 short	Length

4	1 short	Tag DTD index number

6	33 bytes max	Tag name (null terminated)

..	1 short	Length

..	1 byte	End subfunction code (1)

..	1 byte	End function code (225 [0xE1])

Function Code:	225 (0xE1)

Subfunction:	2

Function Name:	Conversion Rule for Intellitag only

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (225 [0xE1])

1	1 byte	Begin subfunction code (2)

2	1 short	Length (43 + 1st cond. length + 2nd cond. length)

4	1 short	Rule number

6	1 short	First condition length

8	1 short	Second condition length

Offset	Size	Meaning

10	1 byte	Rule type

1 = tag rule

2 = ignore rule

4 = global style rule

8 = paired style rule

9 = search and replace rule

10 = table rule

11 = start of document

12 = end of document

The middle of this function varies for different rule types.

For Search and Insert rules (Rule Types 1,2,4,8)

Offset	Size	Meaning

11	32 bytes	Rule subject name

43	1st condition length	Start search and insert condition (null terminated)

..	2nd condition length	End search and insert condition (null terminated)

..	variable	Insert if In Criteria (optional) - text string of tag names null terminated. An example of this string would be "<chapter><section>".

..	variable	Skip if In Criteria - Only present if Insert if In Criteria is present. Text string of tag names null terminated. An example of this string would be "<chapter><section>".

Note:	The Insert if In Criteria and Skip if In Criteria were added after initial release. Support of this function requires handling the function whether the Insert and Skip if In Criteria are present or not.

For Search and Replace rule (Rule Type 9)

Offset	Size	Meaning

11	32 bytes	Unused

4	1st condition length	Search condition (null terminated)

..	2nd condition length	Replace condition (null terminated) length

For Table rule (rule type 10)

Offset	Size	Meaning

11	1 short	Table type

1 = AAP

2 = CALS

4 = ISO

8 = WP

13	30 bytes	Unused

43	1 byte (condition length 1)	Always empty string

44	1 byte (condition length 2)	Always empty string

For Start and End of Document rules (rule types 11, 12)

Offset	Size	Meaning

11	32 bytes	Unused

43	1st condition length	Insert condition (null terminated)

..	1 byte (2nd cond. length)	Always empty string

all rule types are completed with the following

Offset	Size	Meaning

..	1 short	Length

..	1 byte	End subfunction code (2)

..	1 byte	End function code (225 [0xE1])

Function Code:	225 (0xE1)

Subfunction:	3

Function Name:	Ignore On for Intellitag only

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (225 [0xE1])

1	1 byte	Begin subfunction code (3)

2	1 short	Length (4)

4	1 word	Length (4)

6	1 byte	End subfunction code (3)

7	1 byte	End function code (225 [0xE1])

Function Code:	225 (0xE1)

Subfunction:	4

Function Name:	Ignore Off for Intellitag only

Structure:	See the Ignore On definition above

Function Code:	225 (0xE1)

Subfunction:	5

Function Name:	Entity Reference On for Intellitag only

Structure:	Offset	Size	Meaning

0	1 byte	Begin function code (225 [0xE1])

1	1 byte	Begin subfunction code (5)

2	1 short	Length

4	1 short	Reference Flag

bit 0 = 1 for in CDATA

bit 1	1 = character reference

0 = general reference

bit 2 =	1 for external reference

bit 3 =	1 for user defined external reference

bit 4 =	1 for an extended character mapped
entity

bit 5 =	1 transition into data

bit 8 =	1 for CDATA type entity

bit 9 =	1 for SDATA type entity

bit 10 = 1 for NDATA type entity

bit 11 = 1 for SUBDOC type entity

Note:	If bit 2,3,4,8,9,10, or 11 is set, then it is an "open entity," meaning there is no matching Entity Reference Off.

5	1 short	index number

7	33 bytes max	if character reference - character else entity name (either case is null terminated)

..	1 short	Length

..	1 byte	End subfunction code (5)

..	1 byte	End function code (225 [0xE1])

Function Code:	225 (0xE1)

Subfunction:	6

Function Name:	Entity Reference Off for Intellitag only

Structure:	See Entity Reference On definition above