Open String Parameters (Delphi)
Go Up to Delphi Compiler Directives (List) Index
Type |
Switch |
Syntax |
{$P+} or {$P-} {$OPENSTRINGS ON} or {$OPENSTRINGS OFF} |
Default |
{$P+} {$OPENSTRINGS ON} |
Scope |
Local |
Remarks
The $P directive is meaningful only for code compiled in the {$H-} state, and is provided for backwards compatibility with early versions of Delphi and Object Pascal. $P controls the meaning of variable parameters declared using the string keyword in the {$H-} state. In the {$P-} state, variable parameters declared using the string keyword are normal variable parameters, but in the {$P+} state, they are open string parameters. Regardless of the setting of the $P directive, the open string identifier can always be used to declare open string parameters.
Note: The $P directive is obsolete. Now the default string is long (UnicodeString). You should not have to use {$OPENSTRINGS} in any new applications you write.