Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Strings

&pagelevel(4)&pagelevel

This section defines strings which are used with different semantics in EDT statements, for example in search statements, as comments or as special characters.

Strings without a defined delimiter (e.g. quotation mark) are first extracted during the syntax analysis without taking account of the associated semantic constraints.
In this case, all the characters from the first character that is not a blank up to an internally defined delimiter or the end of the statement are used (unless otherwise described for the operand type). EDT normally uses the blank, comma, equals sign and parentheses as a delimiter. Only when the operand has been extracted is it checked for length, characters used and permitted syntax.

Operand

Definition

chars

char | chars char

String.

Operand

Definition

chars*

char* | chars* char*

String which may contain not only characters from the associated character set but also substitute representations for Unicode characters. The substitute representation escseq (see char*) for Unicode characters can be used if a character cannot be entered directly at the keyboard or if Unicode characters are to be entered via files which are not themselves coded in Unicode (see also section “Substitute character representation in Unicode”).

If, for example, the character % is defined as escsymb using @PAR ESCAPE-CHARACTER=‘%‘ then 'Have you got a %U20ac?' would be a valid operand of type chars*.

Operand

Definition

comment

chars

Any comment.

Operand

Definition

message

chars

Any text (up to the end of the statement, including blanks) which is passed to the calling program when EDT is called as a subroutine with @RETURN or @HALT.
The string may contain a maximum of 80 characters and only use printing characters from the EDF03IRV character set.

Operand

Definition

name

chars

String of maximum length of 8 characters corresponding to the SDF data type <alphanum-name 1..8>.

Operand

Definition

str

’ [chars*] ’ [*int] | B ’ binary ’ [*int] | X ’ hex ’ [*int]

Sequence of quoted characters specified either as characters from the associated character set or in their binary or hexadecimal coding. When displaying characters, the Unicode substitute representation escseq is also permitted. Whether or not a blank string is permitted in the character display depends on the statement in question and is set out in the associated description.

If B or X is used, then the binary or hexadecimal digit is always interpreted in the character set for the current work file (or in EDF041 if the current work file does not have a character set) irrespective of what the employed command then does with the string.
If the string needs to contain a apostrophe then it is necessary to enter two apostrophe. The valid quote character can be modified using the @QUOTE statement.

The optional specification of *int is intended for the repetition of strings, e.g. 'ab'*3 is the equivalent of 'ababab'. Since the maximum length of a string is 32768, int must not exceed this value. If int has the value 0 or if the string that is to be repeated has the length 0 then the resulting string has the length 0.

Examples

  • Specifying 'A''BC''D' generates the string A'BC'D.

  • Specifying 'ABC'*5 generates the string ABCABCABCABCABC.

  • Specifying X'C1F2'*4 generates the string A2A2A2A2 if EDF041 has been defined as the character set.

  • Specifying B'11110000'*3 generates the string 000 if EDF041 has been defined as the character set.

  • Specifying 'That is the %U0391 and %U03a9' generates the string 'That is the Α and Ω' if a Unicode character set has been defined and the character % has been declared for @PAR ESCAPE-CHARACTER.

Notes

  • If an odd number of characters is used in a hexadecimal specification then the entry is left-filled with zeros. Thus X'F' is equivalent to X'0F' and X'A'*4 is equivalent to X'0A'*4.

  • The same applies to binary representations if the number of binary characters is not a multiple of 8. Here again, the value is left-filled with zeros until the number of binary characters is a multiple of 8. Thus B'1' is the equivalent of B'00000001' and B'1111'*2 is the equivalent of B'00001111'*2.

Operand

Definition

strchar

str | U’unicode’

Individual character in quotes or in binary or hexadecimal coding or direct specification of UTF16 coding. The resulting string must have precisely the length 1.

Operand

Definition

strspec

str

Individual character in quotes or in binary or hexadecimal coding. The resulting string must have precisely the length 1 and come from the group of characters defined in spec.

Operand

Definition

string

str | line[:cols[,...] [:]] | svarex[:cols[,...] [:]]

A directly or indirectly specified string.

If string is specified indirectly via a string variable or if a line number is specified then EDT uses the content of the string variable or the content of the corresponding line as string. If no such line exists, an error message is output and the statement is rejected.

If only a portion of a line or a string variable is required as string then this can be defined by means of the appropriate column specifications. If column values which exceed the line length are specified then a corresponding number of blanks are used in their place.
For example, if line 6 contains the string AB3CD6EF9 and string is specified as 6:1-
3,9,8,9,8-9,5-7,30,1,30-32,1:, then the corresponding string represented by this expression is AB39F9F9D6E'BLANK'A'BLANK''BLANK''BLANK'A.

If the string specification in a statement consists of a line number which is itself modified by the EDT statement then the original content of the line is used as the operand. If, for example, line 1 has the value ABC and the EDT statement is @CREATE1:1,'D'*3,1, then, after execution of the statement, line 1 has the value ABCDDDABC.

Operand

Definition

search

string

Analogous to the string operand type but, however, a quotation mark (") can be used instead of an apostrophe (') within the alternative str. Both characters can be redefined using the @QUOTE statement.

The search operand type is only used in the @ON statement in order to define the search term.
For an explanation of the meaning of the apostrophe and quotation mark characters in a search statement, see “Searching with @ON”.

Operand

Definition

text

chars*

Follow-up input in certain L mode statements.

The text is treated in the same way as input in L mode, i.e. it is either considered to be a statement and executed immediately or it is considered to be data input and inserted in the current work file at the position of the current line number. EDT is able to determine the nature of the input depending on whether the first characters other than blanks in the text consist of one, two or no statement symbols or user statement symbols (see section “Inputin L mode”).

If the text consists of data input and contains Unicode substitute representations – escseq – then these are only interpreted as Unicode characters if the employed escape character has been defined with @PAR ESCAPE-CHARACTER and @PAR DATA-
REPLACEMENT=ON has been set. If the text is a statement then Unicode substitute representations are only interpreted as Unicode characters inside literals. In this case, the interpretation is independent of the setting of @PAR DATA-REPLACEMENT.