Description
The CALCMAXLEN message is used to calculate the maximum number of characters that will fit within the specified size. Use the Get_Printer CALCMAXLEN message to retrieve the number of characters that fit within the specified size. This is usefully if you have a limited X area to print text, and you want to pre-calculate how much of the text will fit.
Parameters
The CALCMAXLEN message uses the Size parameter to find the maximum number of character that will fit within the specified size. If no Size parameter is specified, then the page width is used.
Parameter
Parameter | Description of Fields | Comments | Default |
---|---|---|---|
Parm1 – Text | <1> Text to calculate | "" | |
Parm2 - Size | <1> Size | This is the size to calculate the number of characters from | "" |
See also
Get_Printer CALCMAXLEN Message
Example
* The following example shows how to use the CALCMAXLEN message. declare function Set_Printer, Get_Printer stat = Set_Printer("INIT") ;* Start printing stat = Set_Printer("CALCMAXLEN", "This is a test", 0.5) size = Get_Printer("CALCMAXLEN") ;* get the max characters stat = Set_Printer("TERM") ;* End printing