ERASE, CERASE |
Top Previous Next |
Syntax
1. erase col|{numexpr}, row|{numexpr}, cols|{numexpr}, rows|{numexpr}
2. erase "text|!=text|~regexp|!~regexp[@left,top,right.bottom]", col|{numexpr}, row|{numexpr}, cols|{numexpr}, rows|{numexpr}
If cerase is used, then columns and rows are interpreted to be the opposite corner of the region, and columns and rows are calculated by UnForm.
Description
The text from the input, in the region indicated by the column, row, columns, and rows parameters, is erased. This keyword may be used to easily clear unwanted text from the output. The text is erased after text expressions and prepage and precopy code blocks are executed, so the information to be erased is available to those routines. If used, numexpr is a Business Basic expression that generates a numeric value for the column, row, columns, or rows.
If syntax 2 is used, then the region is defined relative to any occurrence of the text, or of text that matches the regular expression regexpr. In these cases, there may be no erased regions, or several. column and row are 0-based in these formats. The search for text or regexpr can be limited to a region on the page by adding a suffix in the format '@left,top,right,bottom'. To use a literal "@" character in text or regexpr, it is necessary to specify "\@".
If the syntax "!=text" or "!~regexpr" is used, then the search is for positions NOT equal to the text or NOT matching the regular expression. When using the NOT syntax, only one search is performed per line in the search region.
Also see the erase option of the hline and vline keywords.
When erase is used with PostScript input, it is converted internally to a shade command with a shade percent of 0, resulting in erasure of the region from the overlay. Rule set output commands, such as text or box, are layered on top of the erased region.
Examples:
erase 1,5,30,4 erases text from a region from column 1, row 5, for 30 columns and 4 lines.
erase "John Smith",0,0,10,1 erases all occurrences of "John Smith" from the page.
Drivers: all |