textLiteralDefaultIsString

The textLiteralDefaultIsString property tells EGL how to deal with text literals. By default, EGL treats a literal that has no explicit type declaration as a STRING. This can create conflict with VisualAge® Generator programs, where developers generally use fixed text variable types. In these programs it is inefficient to implement literals as variable length, Unicode strings which require time consuming conversions.

In addition, when passing a literal as an argument in a call , transfer , or show statement, the argument must match the type of the receiving parameter (generally a CHAR type in VisualAge Generator). If you set textLiteralDefaultIsString to NO, EGL gives the literal an appropriate type for assignment to a VisualAge Generator parameter.

The property is BOOLEAN, with the following values:
YES
The preprocessor assigns text literals a type of STRING if they do not have an explicit type specification. This is the default.
NO
The text type depends on the characters in the literal, as shown in the following table:
Table 1. Type assignment for text literals with textLiteralDefaultIsString set to NO
Content of literal Type Length
All single byte characters CHAR Number of characters in literal
All double byte characters DBCHAR Number of characters in literal
Combination of single byte and double byte characters MBCHAR Length of the literal in bytes

Compatibility

Table 2. Compatibility considerations for textLiteralDefaultIsString
Platform Issue
Java™ generation This property textLiteralDefaultIsString does not affect performance. All Java text literals are implemented as Java strings.
JavaScript generation The property textLiteralDefaultIsString is not supported.

Feedback