System.PAnsiChar

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

type PAnsiChar = ^AnsiChar;

C++

typedef char*                PAnsiChar;        //

Properties

Type Visibility Source Unit Parent
pointer
typedef
public
System.pas
sysmac.h
System System

Description

Defines a null-terminated ANSI string.

PAnsiChar defines a pointer to a memory location that contains AnsiChar values (including the #0 character).

In Delphi, one can obtain a PAnsiChar value from an AnsiString, allowing seamless integration with C or C++ applications that expect null-terminated strings.

PAnsiChar is not supported by the Delphi Next Generation (mobile) compilers, but is used by the Delphi desktop compilers.

Notes:
Warning: Do not cast non-character pointer types to PAnsiChar to do pointer arithmetic. Instead, use the PByte pointer type, which is declared with the {$POINTERMATH ON} compiler directive.

See Also