Open String Parameters (Object Pascal)

From Appmethod Topics
Jump to: navigation, search

Go Up to Object Pascal 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 Object Pascal 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.

See Also