SDS top-level constant
Start Directed String.
Representation: CSI s \x5D
Parameter default value: s = 0
SDS is used to establish in the data component the beginning and the end of a string of characters as well as the direction of the string. This direction may be different from that currently established. The indicated string follows the preceding text. The established character progression is not affected.
The beginning of a directed string is indicated by SDS with a parameter value not equal to 0. A directed string may contain one or more nested strings. These nested strings may be directed strings the beginnings of which are indicated by SDS with a parameter value not equal to 0, or reversed strings the beginnings of which are indicated by START REVERSED STRING (SRS) with a parameter value of 1. Every beginning of such a string invokes the next deeper level of nesting.
The Standard does not define the location of the active data position within any such nested string.
The end of a directed string is indicated by SDS with a parameter value of 0. Every end of such a string re-establishes the next higher level of nesting (the one in effect prior to the string just ended). The direction is re-established to that in effect prior to the string just ended. The active data position is moved to the character position following the characters of the string just ended.
The parameter values are:
- 0 - end of a directed string; re-establish the previous direction
- 1 - start of a directed string; establish the direction left-to-right
- 2 - start of a directed string; establish the direction right-to-left
NOTE 1
The effect of receiving a CVT, HT, SCP, SPD or VT control function within an SDS string is not defined by Standard.
NOTE 2
The control functions for area definition (DAQ, EPA, ESA, SPA, SSA) should not be used within an SDS string.
Implementation
const String SDS = ']';