Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between PAnsiChar and PChar

Tags:

types

delphi

Is there a difference and what type of between PAnsiChar and PChar? (in Delphi previous 2007)

Thank you, in advance!

like image 620
pyle Avatar asked Nov 26 '09 12:11

pyle


1 Answers

In D2009 and later: yes, there is. PChar is a pointer to a Char which is a unicode character (a WideChar). And PAnsiChar is a pointer to a AnsiChar, which is - as the name implies - an ANSI character.

EDIT: For pre-2009 versions of Delphi PChar and PAnsiChar are exactly the same. They both point to an (Ansi) character.

like image 188
jpfollenius Avatar answered Sep 25 '22 05:09

jpfollenius