Description

The TABLE message is used to insert a table. There are two main differences between using the TABLE message and the TEXTCOL message. The TABLE message has several border styles, and table cells will wrap to multiple lines.

The TABLE message is deprecated. The ADDTABLE message should be used in place of all TABLE and TEXTCOL messages.

Parameters

ParameterDescription of FieldsDefault
Parm1 - TableText<1> Table Text

@FM between rows and @VM between columns

""
Parm2 - ColHead@VM between columns and @FM between rows""
Parm3 - ColLen@FM between columns""
Parm4 - ColJust@FM between column""
Parm5 - BorderSee OIPRINT_EQUATES0

Remarks

The current font that is set with the FONT message is used to print a table. The TableText parameter contains the text for the table. The rows for the table are delimited by @FM, and the columns are delimited with @VM. The ColHead parameter sets the header for the table, and will be repeated after a pagebreak. The ColHead parameter is not required. The ColLen parameter is required, and is used to specify the lengths of each column in the table. The ColJust parameter will set the justifications for each column in the table. The Border parameter specifies the style of the borders (see the OIPRINT_EQUATES for border styles).

Example

/* The following example shows how to used the TABLE message to insert a table. This example creates a table with column lengths of 1.5, 2.0 and 1.0 inches. 
The justification for the three columns is Right, Center, and Left. There is no border. */ 
 
declare function Set_Printer
stat = Set_Printer("INIT") ;* Start printing
text = "This is cell 11,This is cell 21,This is cell 31/"
text := "This is cell 12,This is cell 22,This is cell 32/"
text := "This is cell 13,This is cell 23,This is cell 33/"
text := ""This is cell 14,This is cell 24,This is cell 34"
convert "/" to @fm in text
convert "," to @vm in text
colLen = "1.5,2,1"
convert "," to @fm in colLen
colHead = "Col1,Col2,Col3"
convert ""," to @fm in colHead
stat = Set_Printer("TABLE", text, colHead, colLen, "R":@FM:"C":@FM:"L", 0)
stat = Set_Printer("TERM") ;* End printing

The output from this example is shown below:

Col1Col2Col3
This is cell 11This is cell 21This is cell 31
This is cell 12This is cell 22This is cell 32
This is cell 13This is cell 23This is cell 33
This is cell 14This is cell 24This is cell 34
  • No labels