$STRINGS - Set default string size

Language reference ›› Directives ››
Parent Previous Next

strings-directive = $STRINGS numeric-expression | DEFAULT .

Defines the default size for strings when there is no size qualifier.

The new size will be used after this line of code.

This directive is local.


Must be evaluated in the 1..255 range.

DEFAULT value is 16.

This directive overrides the default option defined in the Project's Options.

{$STRINGS DEFAULT} // Initially the default string size is fixed to 16 characters.

 STR1: STRING; // equivalent to STRING[16]

{$STRINGS 20} // Set default string size to 20 characters

 STR2: STRING; // equivalent to STRING[20]