Forms a text containing a progression of strings (R.W. Payne).
Options
INCLUDECHARACTERS = string tokens |
Defines the set of characters to include in the progression
( |
---|---|
DIRECTION = string token |
Direction of the progression (ascending , descending ); default asce |
FIRSTLETTERS = string token |
Controls which letters come first (alllower , allupper , lower , upper ); default uppe |
OWNHARACTERSET = text |
Can supply an alternative set of characters |
Parameters
FIRST = texts |
Single-valued text specifying the first string in each progression
|
---|---|
SECOND = texts |
Single-valued text specifying the second string in each progression
|
LAST = texts |
Single-valued text defining the end of each progression
|
PROGRESSION = texts |
Saves the progression
|
Description
TXPROGRESSION
forms a text from a progression of strings. This is saved by the PROGRESSION
parameter. It could be used, for example, for labels of factors, or for defining rows and columns of matrices.
The INCLUDECHARACTERS
option specifies the characters to include in the progression, with settings:
lower |
for lower-case letters (a-z); |
---|---|
upper |
for upper-case letters (A-Z); |
digits |
for the numerical characters 0-9; |
_ |
for the underscore character; |
% |
for the percent character; |
space |
for the space character. |
If they are all specified, the characters will appear in the order: space, percent, digits 0-9, underscore, and then letters. The default is to include only lower-case letters. The alternative, if you do not like any of these possibilities, is to specify your own set of characters, using the OWNCHARACTERS
option.
The FIRSTLETTERS
option controls the ordering of lower- and upper-case letters, if both are included, with settings:
alloower |
all lower-case letters first; |
---|---|
allupper |
all upper-case letters first; |
lower |
letters interspersed, in pairs, with the lower-case letter first (i.e. a, A, b, B etc.); |
upper |
letters interspersed, in pairs, with the upper-case letter first (i.e. A, a, B, b etc.). |
The default is upper
.
The DIRECTION
option specifies whether the progression is in ascending order (e.g. a-z) or descending order (e.g. z-a). Ascending order is the default.
The first string in the progression is specified by the FIRST
parameter. The SECOND
parameter can supply the second string in the progression, thus defining the increment between the strings. If this is not specified, the default is to increment the right-hand character in the string by one for an ascending progression, and minus one for a descending progression. The LAST
parameter defines the end of the progression. (The progression stops when the next string would go beyond LAST
.) FIRST
, SECOND
and LAST
must all contain the same number of characters.
Options: INCLUDECHARACTERS
, DIRECTION
, FIRSTLETTERS
, OWNCHARACTERSET
.
Parameters: FIRST
, SECOND
, LAST
, PROGRESSION
.
Method
The sequence of characters to form the progression is formed using the COUNTER
directive.
Action with RESTRICT
Any restrictions are ignored.
See also
Directives: TXBREAK, TXCONSTRUCT, TXFIND, TXPOSITION, TXREPLACE.
Procedure: TXPAD, TXSPLIT.
Commands for: Calculations and manipulation.
Example
CAPTION 'TXPROGRESSION example','Full character set'; STYLE=meta,minor TXPROGRESSION [INCLUDE=lower,upper,digits,_,%,space] ' '; LAST='z'; \ PROG=Progression PRINT [ORIENT=across] Progression; FIELD=3 CAPTION 'Shifted letters'; STYLE=minor TXPROGRESSION 'abc'; SECOND='bcd'; LAST='xyz'; PROG=Progression PRINT [ORIENT=across] Progression; FIELD=5