Format 2 of the @TABS statement is used to define tabulator (tab) characters and positions for positioning with the software tabulator, output the corresponding current values and activate and deactivate the software tabulator.
If software tabulators have been activated then tabulator expansion is performed when data lines are input from a terminal (not in batch mode or on input from procedures) in L mode (including indirect input via the text operand in certain statements) or when EDT
enters/modifies data lines in the F mode data window. If the software tabulator has been defined (although not necessarily activated), then @TABS (format 3) can be used to perform tabulator expansion for existing lines. Tabulator expansion is performed from left to right in the data lines and it is possible to set two expansion strategies.
The normal forward strategy causes a tab character to be replaced by blanks (at least one) until the following character is located at the next tab position to the right of the current position.
The somewhat unusual positioning strategy causes the nth tab character to be positioned at the nth tab position irrespective of whether this is located to the left or the right of the current position. If it is located to the right of the current position then the tab character is replaced by the corresponding number of blanks in the same way as in the forward strategy. In contrast, if it is located to the left of the current position (or exactly at it) then the tab character is deleted and the current position is set to the tab position. Any following characters then usually overwrite any preceding characters in the entered line. The user can request a message to be output when this occurs.
In both strategies, any tab characters for which no further tab positions can be ascertained are not replaced and are retained as normal text characters.
The settings for the software and hardware tabulator are stored separately.
However, only one of the two tabulator functions can be active at any time. If the software tabulator is activated then any hardware tabulator that may be active is therefore deactivated.
Operation | Operands | F mode, L mode |
@TABS | : : { [char [:] col [,...] ] [ {CHECK | FORWARD | NOCHECK} [col1] ] | ON |
char | Character that EDT is to interpret as a tab character in subsequent input. If If neither |
col | Specifies the comma-separated tab positions for positioning with the tab |
CHECK | EDT uses the positioning strategy described in the introduction and outputs If |
FORWARD | EDT uses the forward strategy described in the introduction. If |
NOCHECK | EDT uses the positioning strategy described in the introduction and does not If It applies until it is explicitly modified again. When EDT starts, the value |
col1 | Specifies the number of characters per line ( If a line is longer than the value specified in If When EDT starts, the value for the line length check in L mode is set to |
ON | The function of the software tabulator is activated. A software tabulator must If no tab positions are defined then the @TABS statement is rejected with |
OFF | The function of the software tabulator is deactivated. The defined tab |
VALUES | The current tab character and the associated software tabulator tab The tab positions for output are five digits in length. Up to 11 tab positions In interactive mode, the output is written to |
If, due to tabulator expansion, a line exceeds the maximum length of 32768 characters then it is truncated to the maximum length and the message EDT1903
is output in L mode and the message EDT2400
in F mode.
If tab positions are defined and the @SCALE ON statement has been used in F mode to activate the column counter display then an additional screen line is displayed in which the current tab positions are indicated by an 'I'
. In this line, the tabulator character itself is depicted in the statement code column.
The tab character applies globally to all the work files. If data is entered in F mode then tabulator expansion is performed in the entire line, not just in the displayed section.
If only a strategy is specified (e.g. @TABS::FORWARD), then this strategy is set even if no software tabulator has been defined. If no strategy is specified then the set strategy is retained. When EDT starts, the value NOCHECK
is set by default.
Note
If @TABS:: is entered then the current software tabulator setting is set to undefined. If no software tabulator at all is specified (but, for example, a hardware tabulator is) then this statement has no effect.
It is better to use @CHECK to modify the value for the line length check in L mode. Here it is now only supported for reasons of compatibility.
The main use of the @TABS statement is to create files, e.g. source files, which have the correct information in the correct columns. For example, it makes sense to issue the statement @TABS::[:10,16,40 CHECK 71 when creating a source file for an Assembler program. CHECK ensures that a message is output if excessively long names are specified (FORWARD instead of CHECK would not achieve the desired effect here). It is sensible to specify a maximum line length of 71 since this means that column 72, which indicates continuation lines, cannot be overwritten.
Caution
It is risky to have too many tab characters in a line when using the positioning strategy.
If a further tabulator expansion is performed, e.g. due to a correction in the line in F mode then these all suddenly become effective – usually with unwanted consequences.
Example
[
is declared as the tab character. Let the tab positions be 10, 16 and 40.
The text is entered together with 3 tab characters.
Tabulator expansions are performed in columns 10, 16 and 40.