System.Openstring
Delphi
type Openstring = ShortString;
C++
typedef char* const Openstring; // D16 string/D32 shortstring formalparm
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
type typedef |
public | System.pas sysmac.h |
System | System |
Description
String type designed to pass strings as parameters.
OpenString is a type of string similar to ShortString. OpenString can only be used for declaring parameters.
The length of an OpenString is stored in the first byte of the string and cannot be greater than 255.
The number of allocated bytes can be less than 255 and can be obtained with the SizeOf
function.
The index used for accessing a character is not checked for correctness. The valid range is [1; High(open_string_object)
].
OpenString parameters can be declared only with the var
specifier. Any changes made inside a function/procedure are visible after exiting the function/procedure.
- Note: Openstring is used by the Delphi desktop compilers, but is not supported by the Delphi mobile compilers. For more information, see Migrating Delphi Code to Mobile from Desktop.