System.PAnsiChar

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

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 Object Pascal, 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 Object Pascal Next Generation (mobile) compilers, but is used by the Object Pascal 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