$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.


<numeric-expression>:

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.

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

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

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