Text extraction

Format

T [ start, ] length

The T code extracts a contiguous string of characters from a field.

start
Starting column number. If omitted, 1 is assumed.
length
Number of characters to extract.

If you specify length only, the extraction is either from the left or from the right depending on the justification specified in line 5 of the dictionary definition item. In a BASIC program if you specify length only, the extraction is from the right. In this case the starting position is calculated according to the following formula:

string.length - substring.length + 1

This lets you extract the last n characters of a string without having to calculate the string length.

If start is specified, extraction is always from left to right.