Purpose |
|
Syntax |
XPRINT SPLIT [WORD] MainStr, Part1Len TO Part1Var, Part2Var |
Remarks |
Generally speaking, XPRINT SPLIT allows you to determine how much text will fit on a line (or a line section), so you don't overrun the end. This is critical with variable-width fonts. Since these text characters have different widths, you cannot rely on a simple character count. XPRINT SPLIT separates the MainStr
string expression into two parts, which are then assigned to the two string
variables specified by Part1Var
and Part2Var. The
Since this operation creates a "line break" not contemplated in the original text, you may have to modify the results in order to obtain the best appearance. For example, it's usually best to remove any leading spaces from Part2Var before printing it. |
WORD |
If the WORD option is included, PowerBASIC guarantees that Part1 will not end on a partial word. This may require that Part1Len is adjusted to a smaller value. In that case, Part2Var would be assigned these characters to compensate. |
See also |
XPRINT CELL, XPRINT SET FONT, XPRINT SET WORDWRAP, XPRINT SET WRAP |